@pecot/visual-mcp 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +35 -5
  3. package/assets/slidev/deck-lint.config.js +2 -2
  4. package/assets/slidev/deck-lint.env.config.js +2 -2
  5. package/assets/slidev/package.json +3 -3
  6. package/assets/slidev/runtime/package.json +1 -1
  7. package/assets/slidev/scripts/eslint/_shared/dist/lib/drawio-geometry.js +10 -10
  8. package/assets/slidev/scripts/eslint/_shared/dist/lib/text-measurer.d.ts +2 -2
  9. package/assets/slidev/scripts/eslint/_shared/dist/lib/text-measurer.js +4 -4
  10. package/assets/slidev/scripts/eslint/_shared/dist/tsconfig.tsbuildinfo +1 -1
  11. package/assets/slidev/scripts/eslint/_shared/lib/drawio-geometry.ts +10 -10
  12. package/assets/slidev/scripts/eslint/_shared/lib/text-measurer.ts +4 -4
  13. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-content-before-frontmatter.js +1 -1
  14. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-missing-marker-cell.js +4 -4
  15. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-missing-page.js +1 -1
  16. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-numeric-asset-prefix.js +1 -1
  17. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-numeric-filename-prefix.js +1 -1
  18. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-scaled-drawio.js +3 -3
  19. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-triple-hyphen-in-frontmatter.js +3 -3
  20. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-unknown-props.js +3 -3
  21. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/one-slide-per-file.js +1 -1
  22. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/require-matching-length.js +1 -1
  23. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/require-slides-entry.js +1 -1
  24. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/validate-clicks.js +7 -7
  25. package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/tsconfig.tsbuildinfo +1 -1
  26. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-content-before-frontmatter.ts +1 -1
  27. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-missing-marker-cell.ts +4 -4
  28. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-missing-page.ts +1 -1
  29. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-numeric-asset-prefix.ts +1 -1
  30. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-numeric-filename-prefix.ts +1 -1
  31. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-scaled-drawio.ts +3 -3
  32. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-triple-hyphen-in-frontmatter.ts +3 -3
  33. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-unknown-props.ts +3 -3
  34. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/one-slide-per-file.ts +1 -1
  35. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/require-matching-length.ts +1 -1
  36. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/require-slides-entry.ts +1 -1
  37. package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/validate-clicks.ts +7 -7
  38. package/assets/slidev/scripts/eslint/text-constraints/dist/lib/rules/max-chars.js +6 -6
  39. package/assets/slidev/scripts/eslint/text-constraints/dist/lib/rules/textlint-body.js +3 -3
  40. package/assets/slidev/scripts/eslint/text-constraints/dist/lib/rules/textlint.js +2 -2
  41. package/assets/slidev/scripts/eslint/text-constraints/dist/tsconfig.tsbuildinfo +1 -1
  42. package/assets/slidev/scripts/eslint/text-constraints/lib/rules/max-chars.ts +6 -6
  43. package/assets/slidev/scripts/eslint/text-constraints/lib/rules/textlint-body.ts +3 -3
  44. package/assets/slidev/scripts/eslint/text-constraints/lib/rules/textlint.ts +2 -2
  45. package/assets/slidev/scripts/eslint/validate-references/dist/index.js +1 -1
  46. package/assets/slidev/scripts/eslint/validate-references/dist/lib/semantic-validator.js +12 -12
  47. package/assets/slidev/scripts/eslint/validate-references/dist/tsconfig.tsbuildinfo +1 -1
  48. package/assets/slidev/scripts/eslint/validate-references/index.ts +1 -1
  49. package/assets/slidev/scripts/eslint/validate-references/lib/semantic-validator.ts +12 -12
  50. package/cli/dist/cli.js +8 -8
  51. package/cli/dist/commands/chromium/host-dependencies.js +3 -3
  52. package/cli/dist/commands/drawio/export.js +15 -15
  53. package/cli/dist/commands/drawio/theme.js +7 -7
  54. package/cli/dist/commands/drawio/url.js +14 -14
  55. package/cli/dist/commands/evidence-xlsx/create.js +11 -11
  56. package/cli/dist/commands/pptx-ooxml/preview.js +13 -13
  57. package/cli/dist/commands/slidev-project/create.js +12 -12
  58. package/cli/dist/commands/slidev-project/linked-theme.js +5 -5
  59. package/cli/dist/commands/slidev-project/lint.js +13 -13
  60. package/cli/dist/commands/slidev-project/sync.js +19 -19
  61. package/cli/dist/commands/slidev-project/theme.js +9 -9
  62. package/cli/dist/commands/slidev-to-pptx/convert.js +47 -47
  63. package/cli/dist/domain/_shared/text-check.js +2 -2
  64. package/cli/dist/domain/drawio/export.js +4 -4
  65. package/cli/dist/domain/drawio/label-text.js +1 -1
  66. package/cli/dist/domain/drawio/url.js +27 -27
  67. package/cli/dist/domain/evidence-xlsx/image-dimensions.js +14 -14
  68. package/cli/dist/domain/evidence-xlsx/layout.d.ts +2 -3
  69. package/cli/dist/domain/evidence-xlsx/ooxml.d.ts +1 -8
  70. package/cli/dist/domain/evidence-xlsx/ooxml.js +35 -24
  71. package/cli/dist/domain/evidence-xlsx/spec-schema.js +26 -26
  72. package/cli/dist/domain/pptx-ooxml/merge.js +3 -3
  73. package/cli/dist/domain/slidev-project/generated-files.d.ts +1 -1
  74. package/cli/dist/domain/slidev-project/generated-files.js +34 -34
  75. package/cli/dist/domain/slidev-project/initial-pages.js +4 -4
  76. package/cli/dist/domain/slidev-project/lint.js +11 -11
  77. package/cli/dist/domain/slidev-project/sync.js +13 -13
  78. package/cli/dist/domain/slidev-project/warnings.js +4 -4
  79. package/cli/dist/domain/slidev-theme/declaration.js +9 -9
  80. package/cli/dist/domain/slidev-theme/references.js +10 -10
  81. package/cli/dist/domain/slidev-theme/store-layout.js +6 -6
  82. package/cli/dist/domain/slidev-theme/talk-theme.js +13 -13
  83. package/cli/dist/domain/slidev-theme/theme-spec.js +5 -5
  84. package/cli/dist/domain/slidev-to-pptx/errors.js +3 -3
  85. package/cli/dist/infra/_shared/dependency-root.js +4 -4
  86. package/cli/dist/infra/_shared/patch-apply.js +6 -5
  87. package/cli/dist/infra/_shared/runtime-install.js +4 -3
  88. package/cli/dist/infra/_shared/slidev-bin.js +1 -1
  89. package/cli/dist/infra/drawio/icons.js +3 -3
  90. package/cli/dist/infra/drawio/pdf.js +1 -1
  91. package/cli/dist/infra/drawio/screenshot.js +10 -9
  92. package/cli/dist/infra/evidence-xlsx/workbook-writer.js +2 -2
  93. package/cli/dist/infra/playwright/chromium.js +4 -3
  94. package/cli/dist/infra/playwright/host-dependencies.js +8 -8
  95. package/cli/dist/infra/playwright/launch.js +5 -5
  96. package/cli/dist/infra/pptx-ooxml/soffice.js +2 -2
  97. package/cli/dist/infra/slidev-project/eslint-runner.js +10 -9
  98. package/cli/dist/infra/slidev-project/fs.js +6 -6
  99. package/cli/dist/infra/slidev-theme/store.js +18 -15
  100. package/cli/dist/infra/slidev-to-pptx/cache-store.js +6 -6
  101. package/cli/dist/infra/slidev-to-pptx/dom-converter.js +12 -12
  102. package/cli/dist/infra/slidev-to-pptx/pipeline.d.ts +1 -1
  103. package/cli/dist/infra/slidev-to-pptx/pipeline.js +54 -54
  104. package/cli/dist/infra/slidev-to-pptx/prerender-capture.js +14 -14
  105. package/cli/dist/infra/slidev-to-pptx/prerender.js +10 -10
  106. package/cli/dist/infra/slidev-to-pptx/runner.js +1 -0
  107. package/cli/dist/infra/slidev-to-pptx/scanner.js +10 -10
  108. package/cli/dist/infra/slidev-to-pptx/server.js +2 -2
  109. package/cli/dist/infra/slidev-to-pptx/single-pass-worker.js +39 -39
  110. package/cli/dist/infra/slidev-to-pptx/slide-worker.js +3 -3
  111. package/cli/dist/infra/slidev-to-pptx/visibility-helpers.js +8 -8
  112. package/cli/dist/mcp/dev-server-registry.js +10 -9
  113. package/cli/dist/mcp/queue.js +1 -1
  114. package/cli/dist/mcp/result.js +4 -4
  115. package/cli/dist/mcp/serve.js +1 -1
  116. package/cli/dist/mcp/server.js +2 -2
  117. package/cli/dist/mcp/tools/_shared.d.ts +1 -1
  118. package/cli/dist/mcp/tools/_shared.js +36 -37
  119. package/cli/dist/mcp/tools/drawio.js +22 -22
  120. package/cli/dist/mcp/tools/evidence.js +8 -8
  121. package/cli/dist/mcp/tools/setup.js +26 -26
  122. package/cli/dist/mcp/tools/slide-dev.js +20 -20
  123. package/cli/dist/mcp/tools/slide-page.js +36 -36
  124. package/cli/dist/mcp/tools/slide-theme.js +6 -6
  125. package/cli/dist/mcp/tools/slide.js +49 -49
  126. package/cli/dist/mcp/windows-path.js +8 -7
  127. package/cli/dist/node-runtime.d.ts +6 -1
  128. package/cli/dist/node-runtime.js +16 -8
  129. package/npm-shrinkwrap.json +25 -31
  130. package/package.json +2 -2
  131. package/vendor/text-rules/dist/source-hash +1 -1
@@ -32,9 +32,9 @@ eslint 自身の exit 2(設定エラー)は domain で `SlideLintRuntimeErro
32
32
  */
33
33
  export function createSlideLintCommand(buildDependencies) {
34
34
  const command = new Command('lint')
35
- .description('talk-dir 全体(pages/**/*.md と slides.md)を lint する')
36
- .requiredOption('--dir <path>', 'lint 対象の talk-dir 絶対パス')
37
- .option('--json', 'machine-readable な JSON を stdout に出す', false)
35
+ .description('lint the whole talk-dir (pages/**/*.md and slides.md)')
36
+ .requiredOption('--dir <path>', 'absolute path of the talk-dir to lint')
37
+ .option('--json', 'print machine-readable JSON to stdout', false)
38
38
  .exitOverride()
39
39
  .configureOutput({
40
40
  writeErr: (string_) => {
@@ -62,7 +62,7 @@ export function createSlideLintCommand(buildDependencies) {
62
62
  }
63
63
  else {
64
64
  // 件数行を読まずに成否が分かるよう見出し行に結果を載せる(no-target は exit 0 側)。
65
- const outcomeLabel = summary.outcome === 'violations' ? '違反あり' : '成功';
65
+ const outcomeLabel = summary.outcome === 'violations' ? 'violations' : 'success';
66
66
  writeData(dependencies.stdout, `slide lint: ${outcomeLabel} (${summary.directory})`);
67
67
  writeSummaryLines(summary, dependencies);
68
68
  }
@@ -81,7 +81,7 @@ export function createSlideLintCommand(buildDependencies) {
81
81
  }));
82
82
  }
83
83
  else {
84
- createDiagnostics(dependencies.stderr).error(`slide lint 失敗: ${detail}`);
84
+ createDiagnostics(dependencies.stderr).error(`slide lint failed: ${detail}`);
85
85
  }
86
86
  process.exitCode = toExitCode(error);
87
87
  }
@@ -138,15 +138,15 @@ dependencies) {
138
138
  // 走査抜けの警告は lint 対象 0 件でも出す必要があるため no-target の早期 return より前に置く。
139
139
  const diagnostics = createDiagnostics(dependencies.stderr);
140
140
  for (const skipped of summary.skippedSymlinkDirectories) {
141
- diagnostics.warning(`${skipped} は symlink のため eslint の走査対象になりません`
142
- + '(配下は lint されていない可能性があります)');
141
+ diagnostics.warning(`${skipped} is a symlink and is not scanned by eslint`
142
+ + ' (files under it may not be linted)');
143
143
  }
144
144
  if (summary.outcome === 'no-target') {
145
- writeData(dependencies.stdout, ` lint 対象 0 件(pages/**/*.md と slides.md が見つかりません)`);
145
+ writeData(dependencies.stdout, ` linted 0 files (no pages/**/*.md or slides.md found)`);
146
146
  return;
147
147
  }
148
- writeData(dependencies.stdout, ` lint 対象 ${String(summary.lintedFileCount)} 件 / エラー ${String(summary.errorCount)} 件`
149
- + ` / 警告 ${String(summary.warningCount)} 件`);
148
+ writeData(dependencies.stdout, ` linted ${String(summary.lintedFileCount)} files / ${String(summary.errorCount)} errors`
149
+ + ` / ${String(summary.warningCount)} warnings`);
150
150
  for (const violation of summary.violations) {
151
151
  writeData(dependencies.stdout, ` ${violation.file}:${String(violation.line)}:${String(violation.column)}`
152
152
  + ` ${violation.rule} ${violation.message}`);
@@ -179,13 +179,13 @@ export function writeAutoDeckLintReport(report, talkDirectory,
179
179
  dependencies) {
180
180
  const { summary } = report;
181
181
  if (summary === undefined) {
182
- createDiagnostics(dependencies.stderr).warning(`deck lint をスキップしました: ${report.failure ?? ''}`);
182
+ createDiagnostics(dependencies.stderr).warning(`deck lint skipped: ${report.failure ?? ''}`);
183
183
  return;
184
184
  }
185
185
  writeData(dependencies.stdout, 'deck lint:');
186
186
  writeSummaryLines(summary, dependencies);
187
187
  if (summary.outcome === 'violations') {
188
- writeData(dependencies.stdout, ` 上記の違反はこのコマンドの成否には影響しません。修正後 pecotv slide lint --dir ${talkDirectory} で再確認してください。`);
188
+ writeData(dependencies.stdout, ` the violations above do not affect this command's result; after fixing, run pecotv slide lint --dir ${talkDirectory} to recheck`);
189
189
  }
190
190
  }
191
191
  /**
@@ -258,7 +258,7 @@ export function slideLintDefaultDependencies() {
258
258
  const pluginRoot = process.env['CLAUDE_PLUGIN_ROOT'];
259
259
  /* c8 ignore next 3 -- bin/pecotv が CLAUDE_PLUGIN_ROOT を必ず export するため未設定ルートは実運用で発生しない */
260
260
  if (pluginRoot === undefined || pluginRoot === '') {
261
- throw new SlideLintRuntimeError('CLAUDE_PLUGIN_ROOT が未設定です', 'unknown');
261
+ throw new SlideLintRuntimeError('CLAUDE_PLUGIN_ROOT is not set', 'unknown');
262
262
  }
263
263
  const runtimeDirectory = runningMirrorDirectory();
264
264
  return {
@@ -54,14 +54,14 @@ commander コマンドファクトリ。コマンド名は `sync`、`slide` グ
54
54
  */
55
55
  export function createSlideSyncCommand(buildDependencies) {
56
56
  const command = new Command('sync')
57
- .description('talk-dir を同期する。テンプレートのコピーを持つ移行前の talk-dir は、--theme で指定したテーマを参照する形へ移す'
58
- + '(テンプレート由来のファイルを消し、作品の slides.md・pages/*.md・public/slides/ は残す)。'
59
- + 'テーマを参照する移行済みの talk-dir は、package.json の依存の版でテーマを取得して node_modules を張り直す。'
60
- + '本体の生成ファイル(vite.config.ts・start.mjs)は本体の今の内容にそろえ、ほかは変えない')
61
- .requiredOption('--dir <path>', '同期対象の talk-dir 絶対パス')
62
- .option('--theme <spec>', '移行前の talk-dir が参照するテーマ (git+https://<host>/<owner>/<repo>.git#<tag> か file:<path>)')
63
- .option('--node-modules-only', 'node_modules の張り直しのみ実行する(移行済みの talk-dir の通常の sync も同じ動き)', false)
64
- .option('--json', 'machine-readable な JSON を stdout に出す', false)
57
+ .description('sync a talk-dir; a pre-migration talk-dir that holds a template copy is moved to reference the theme given by --theme'
58
+ + ' (template-derived files are removed; slides.md, pages/*.md and public/slides/ are kept); '
59
+ + 'a migrated talk-dir fetches the theme at the version in package.json dependencies and rebuilds node_modules; '
60
+ + 'generated files (vite.config.ts, start.mjs) are aligned with the current plugin output; nothing else changes')
61
+ .requiredOption('--dir <path>', 'absolute path of the talk-dir to sync')
62
+ .option('--theme <spec>', 'theme referenced by a pre-migration talk-dir (git+https://<host>/<owner>/<repo>.git#<tag> or file:<path>)')
63
+ .option('--node-modules-only', 'rebuild node_modules only (a normal sync of a migrated talk-dir does the same)', false)
64
+ .option('--json', 'print machine-readable JSON to stdout', false)
65
65
  .exitOverride()
66
66
  .configureOutput({
67
67
  writeErr: (string_) => {
@@ -112,7 +112,7 @@ export function createSlideSyncCommand(buildDependencies) {
112
112
  }));
113
113
  }
114
114
  else {
115
- createDiagnostics(dependencies.stderr).error(`slide sync 失敗: ${detail}`);
115
+ createDiagnostics(dependencies.stderr).error(`slide sync failed: ${detail}`);
116
116
  }
117
117
  process.exitCode = toExitCode(error);
118
118
  }
@@ -130,27 +130,27 @@ function writeSyncSummary(summary,
130
130
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
131
131
  stdout) {
132
132
  const { theme } = summary;
133
- const themeLine = theme === undefined ? undefined : ` テーマ: ${theme.name} (${theme.spec})`;
133
+ const themeLine = theme === undefined ? undefined : ` theme: ${theme.name} (${theme.spec})`;
134
134
  if (summary.nodeModulesOnly) {
135
- writeData(stdout, `slide sync (node_modules のみ): 成功 (${summary.directory})`);
135
+ writeData(stdout, `slide sync (node_modules only): success (${summary.directory})`);
136
136
  if (themeLine !== undefined)
137
137
  writeData(stdout, themeLine);
138
138
  writeData(stdout, ` node_modules → ${summary.nodeModulesTarget}`);
139
139
  return;
140
140
  }
141
- writeData(stdout, `slide sync: 成功 (${summary.directory})`);
141
+ writeData(stdout, `slide sync: success (${summary.directory})`);
142
142
  if (themeLine !== undefined)
143
143
  writeData(stdout, themeLine);
144
144
  if (summary.mode === 'relink') {
145
145
  if (theme !== undefined)
146
- writeData(stdout, ` 置き場: ${theme.directory}`);
146
+ writeData(stdout, ` location: ${theme.directory}`);
147
147
  writeData(stdout, ` node_modules → ${summary.nodeModulesTarget}`);
148
- writeData(stdout, ' node_modules のほかは変えていません。');
148
+ writeData(stdout, ' nothing changed except node_modules');
149
149
  return;
150
150
  }
151
151
  writeData(stdout, ` node_modules → ${summary.nodeModulesTarget}`);
152
- writeData(stdout, ` 消した名前 (${String(summary.removed.length)} 件): ${summary.removed.join(', ')}`);
153
- writeData(stdout, ' 作品領域(slides.md / pages/*.md / public/slides/)は残しました。slides.md の theme: と package.json の依存を書き換えています。');
152
+ writeData(stdout, ` removed (${String(summary.removed.length)}): ${summary.removed.join(', ')}`);
153
+ writeData(stdout, ' kept slides.md, pages/*.md and public/slides/; rewrote theme: in slides.md and the dependency in package.json');
154
154
  }
155
155
  /**
156
156
  `slide sync` の実処理と機械可読な結果組み立て。CLI action と MCP ツールの双方がここを通る。
@@ -209,7 +209,7 @@ stderr) {
209
209
  }
210
210
  catch (error) {
211
211
  // 移行前の形 (theme: none) もここに来る。一覧を空にして、同期の成否は変えない。
212
- createDiagnostics(stderr).warning(`layout catalog を読み取れませんでした: ${directory} (${formatError(error)})`);
212
+ createDiagnostics(stderr).warning(`cannot read layout catalog: ${directory}: ${formatError(error)}`);
213
213
  return { categories: [], layouts: [] };
214
214
  }
215
215
  }
@@ -250,7 +250,7 @@ async function prepareMigrationTheme(themeOption, talkDirectory, context) {
250
250
  assertDependencyRootAvailable(dependencyRoot);
251
251
  const storeRoot = context.storeRoot();
252
252
  if (storeRoot === undefined) {
253
- throw new SlideCreateRuntimeError('テーマの置き場を決められません。データ置き場(CLAUDE_PLUGIN_DATA)を確認してください', 'theme-unknown');
253
+ throw new SlideCreateRuntimeError('cannot determine the theme location (fix: check the data directory CLAUDE_PLUGIN_DATA)', 'theme-unknown');
254
254
  }
255
255
  const fetched = await context.fetch(spec, {
256
256
  storeRoot,
@@ -317,7 +317,7 @@ export function slideSyncDefaultDependencies() {
317
317
  const pluginRoot = process.env['CLAUDE_PLUGIN_ROOT'];
318
318
  /* c8 ignore next 3 -- bin/pecotv が CLAUDE_PLUGIN_ROOT を必ず export するため未設定ルートは実運用で発生しない */
319
319
  if (pluginRoot === undefined || pluginRoot === '') {
320
- throw new SlideSyncRuntimeError('CLAUDE_PLUGIN_ROOT が未設定です', 'unknown');
320
+ throw new SlideSyncRuntimeError('CLAUDE_PLUGIN_ROOT is not set', 'unknown');
321
321
  }
322
322
  const dependencyRoot = pluginDependencyRoot();
323
323
  return {
@@ -18,8 +18,8 @@ import { themeErrorReason } from '../../domain/slidev-theme/error-reason.js';
18
18
  import { buildLayoutCatalog, readLayoutCategories, resolveLayoutReferences, } from '../../domain/slidev-theme/references.js';
19
19
  import { resolveTalkTheme } from '../../domain/slidev-theme/talk-theme.js';
20
20
  import { NodeThemeFiles } from '../../infra/slidev-theme/fs.js';
21
- const LINK_COLOR_WARNING = 'pptx.linkColor を省いたため、PPTX ではリンクは変換されません(ハイパーリンクが付きません)。'
22
- + `リンクを変換するには ${THEME_DECLARATION_FILE_NAME} の pptx.linkColor に 6 桁の 16 進で書いてください`;
21
+ const LINK_COLOR_WARNING = 'pptx.linkColor is omitted, so links are not converted in PPTX (no hyperlinks are added) '
22
+ + `(fix: set pptx.linkColor in ${THEME_DECLARATION_FILE_NAME} to a 6-digit hex value to convert links)`;
23
23
  /**
24
24
  `slide theme` の実処理。CLI action と MCP ツール(slide_theme)、lint・page・convert もここを通る。
25
25
 
@@ -87,9 +87,9 @@ stdout,
87
87
  stderr) {
88
88
  const { theme } = data;
89
89
  writeData(stdout, `slide theme: ${theme.name} (${theme.spec})`);
90
- writeData(stdout, ` テーマ root: ${theme.directory}`);
91
- writeData(stdout, ` 宣言: ${theme.declared ? 'あり' : 'なし'}`);
92
- writeData(stdout, ` レイアウト ${String(data.layouts.length)} 件`);
90
+ writeData(stdout, ` theme root: ${theme.directory}`);
91
+ writeData(stdout, ` declaration: ${theme.declared ? 'present' : 'absent'}`);
92
+ writeData(stdout, ` layouts: ${String(data.layouts.length)}`);
93
93
  for (const category of data.categories) {
94
94
  writeData(stdout, ` --- ${category.label}: ${category.question} ---`);
95
95
  const members = data.layouts.filter(entry => entry.category === category.id);
@@ -112,9 +112,9 @@ exit code: 成功 = 0 / 解決・宣言の失敗 = 1 / usage error = 2(command
112
112
  */
113
113
  export function createSlideThemeCommand(buildDependencies) {
114
114
  const command = new Command('theme')
115
- .description('talk-dir が参照するテーマの宣言とレイアウトの一覧を返す')
116
- .option('--dir <path>', 'talk-dir のパス(省略時はカレント)')
117
- .option('--json', 'machine-readable な JSON を stdout に出す', false)
115
+ .description('print the theme declaration and layout list referenced by a talk-dir')
116
+ .option('--dir <path>', 'talk-dir path (default: current directory)')
117
+ .option('--json', 'print machine-readable JSON to stdout', false)
118
118
  .exitOverride()
119
119
  .configureOutput({
120
120
  writeErr: (string_) => {
@@ -151,7 +151,7 @@ export function createSlideThemeCommand(buildDependencies) {
151
151
  writeData(dependencies.stdout, JSON.stringify({ event: 'slide.theme.error', reason, detail }));
152
152
  }
153
153
  else {
154
- createDiagnostics(dependencies.stderr).error(`slide theme 失敗: ${detail}`);
154
+ createDiagnostics(dependencies.stderr).error(`slide theme failed: ${detail}`);
155
155
  }
156
156
  process.exitCode = 1;
157
157
  }
@@ -41,7 +41,7 @@ const MORPH_OPTIONS = ['byObject', 'byWord', 'byChar'];
41
41
  */
42
42
  export function formatConvertProgress(completed, total) {
43
43
  const percent = total === 0 ? 0 : Math.floor((completed / total) * 100);
44
- return `変換 ${String(completed)}/${String(total)} (${String(percent)}%)`;
44
+ return `converting ${String(completed)}/${String(total)} (${String(percent)}%)`;
45
45
  }
46
46
  export class SlideConvertUsageError extends Error {
47
47
  reason;
@@ -81,7 +81,7 @@ const PPTX_CONVERT_IDLE_TIMEOUT_MS = 600_000;
81
81
  const THEME_PATTERN = /^[\w@/.-]+$/;
82
82
  export function validateTheme(theme) {
83
83
  if (!THEME_PATTERN.test(theme)) {
84
- throw new SlideConvertUsageError(`--theme: 許容文字 [a-zA-Z0-9@/_.-] のみ受理 (指定値: ${theme})`, 'invalid-theme');
84
+ throw new SlideConvertUsageError(`--theme accepts only [a-zA-Z0-9@/_.-]: ${theme}`, 'invalid-theme');
85
85
  }
86
86
  }
87
87
  /**
@@ -89,7 +89,7 @@ export function validateTheme(theme) {
89
89
  */
90
90
  function throwIfCancelled(signal) {
91
91
  if (signal?.aborted === true) {
92
- throw new SlideConvertRuntimeError('キャンセルされました', 'cancelled');
92
+ throw new SlideConvertRuntimeError('cancelled', 'cancelled');
93
93
  }
94
94
  }
95
95
  async function ensureProjectDirectory(projectDirectory) {
@@ -98,17 +98,17 @@ async function ensureProjectDirectory(projectDirectory) {
98
98
  stats = await stat(projectDirectory);
99
99
  }
100
100
  catch {
101
- throw new SlideConvertRuntimeError(`project-dir が存在しません: ${projectDirectory}`, 'project-not-found');
101
+ throw new SlideConvertRuntimeError(`directory not found: ${projectDirectory}`, 'project-not-found');
102
102
  }
103
103
  if (!stats.isDirectory()) {
104
- throw new SlideConvertRuntimeError(`project-dir はディレクトリではありません: ${projectDirectory}`, 'project-not-found');
104
+ throw new SlideConvertRuntimeError(`not a directory: ${projectDirectory}`, 'project-not-found');
105
105
  }
106
106
  const slidesMd = path.join(projectDirectory, 'slides.md');
107
107
  try {
108
108
  await stat(slidesMd);
109
109
  }
110
110
  catch {
111
- throw new SlideConvertRuntimeError(`slides.md が見つかりません: ${slidesMd}`, 'project-not-found');
111
+ throw new SlideConvertRuntimeError(`slides.md not found: ${slidesMd}`, 'project-not-found');
112
112
  }
113
113
  }
114
114
  async function cleanBuildArtifacts(projectDirectory) {
@@ -200,15 +200,15 @@ dependencies) {
200
200
  buildOptions.stderr = dependencies.stderr;
201
201
  }
202
202
  const buildStart = dependencies.now();
203
- dependencies.onProgress?.('slidev build 中');
203
+ dependencies.onProgress?.('running slidev build');
204
204
  const buildResult = await dependencies.slidevRunner.build(projectAbs, buildOptions);
205
205
  const slidevBuildMs = dependencies.now() - buildStart;
206
206
  throwIfCancelled(dependencies.signal);
207
207
  if (buildResult.timedOut) {
208
- throw new SlideConvertRuntimeError(`slidev build がタイムアウトしました (${String(SLIDEV_BUILD_TIMEOUT_MS)}ms): ${formatStderrTail(buildResult.stderr)}`, 'slidev-build-timeout');
208
+ throw new SlideConvertRuntimeError(`slidev build timed out after ${String(SLIDEV_BUILD_TIMEOUT_MS)}ms: ${formatStderrTail(buildResult.stderr)}`, 'slidev-build-timeout');
209
209
  }
210
210
  if (didExitNonZero(buildResult)) {
211
- throw new SlideConvertRuntimeError(`slidev build が失敗しました (exit ${String(buildResult.exitCode)}): ${formatStderrTail(buildResult.stderr)}`, 'slidev-build-failed');
211
+ throw new SlideConvertRuntimeError(`slidev build failed (exit ${String(buildResult.exitCode)}): ${formatStderrTail(buildResult.stderr)}`, 'slidev-build-failed');
212
212
  }
213
213
  // in-process pipeline は skipPostprocess 指定時、staging/slides/<prefix><N>.pptx のみを出力する。
214
214
  // Phase 2+3 は skip する。
@@ -246,7 +246,7 @@ dependencies) {
246
246
  };
247
247
  }
248
248
  // スキャンが終わるまでステップ総数は決まらないため、それまでは工程名だけを出す。
249
- report?.('スライド走査中');
249
+ report?.('scanning slides');
250
250
  let pipelineResult;
251
251
  const pipelineStart = dependencies.now();
252
252
  try {
@@ -255,28 +255,28 @@ dependencies) {
255
255
  catch (error) {
256
256
  throwIfCancelled(dependencies.signal);
257
257
  if (error instanceof PipelineTimeoutError) {
258
- throw withPipelineDiagnostics(new SlideConvertRuntimeError(`pptx convert がタイムアウトしました: ${error.message}`, 'pptx-convert-timeout'), { warnings: error.warnings, errors: error.errors });
258
+ throw withPipelineDiagnostics(new SlideConvertRuntimeError(`pptx convert timed out: ${error.message}`, 'pptx-convert-timeout'), { warnings: error.warnings, errors: error.errors });
259
259
  }
260
260
  // InProcessSlidevPptxPipeline.convert() が throw するのは、PipelineTimeoutError か PipelineRuntimeError のみ。
261
261
  // これは二重 wrap 防止と、内部例外の wrap 済を前提にした契約。
262
262
  // それ以外のルートは無いため、ここでは PipelineRuntimeError として処理する。
263
263
  if (error instanceof PipelineRuntimeError) {
264
- throw withPipelineDiagnostics(new SlideConvertRuntimeError(`pptx convert が失敗しました: ${error.message}`, 'pptx-convert-failed'), { warnings: error.warnings, errors: error.errors });
264
+ throw withPipelineDiagnostics(new SlideConvertRuntimeError(`pptx convert failed: ${error.message}`, 'pptx-convert-failed'), { warnings: error.warnings, errors: error.errors });
265
265
  }
266
266
  /* c8 ignore start -- defensive: SlidevPptxPipeline 契約上、上 2 例外型以外は到達不能。test fake が直 throw した場合の最終 net。 */
267
- throw new SlideConvertRuntimeError(`pptx convert が失敗しました: ${formatError(error)}`, 'pptx-convert-failed');
267
+ throw new SlideConvertRuntimeError(`pptx convert failed: ${formatError(error)}`, 'pptx-convert-failed');
268
268
  /* c8 ignore stop */
269
269
  }
270
270
  // pipeline がキャンセルに間に合わず完走した場合も、PPTX は書き出さない。
271
271
  throwIfCancelled(dependencies.signal);
272
272
  const mergeStart = dependencies.now();
273
273
  const pipelineMs = mergeStart - pipelineStart;
274
- report?.('PPTX 結合中');
274
+ report?.('merging PPTX');
275
275
  // pipeline が完走している以降の失敗でも、pipeline が積んだ警告・エラーは失われないよう
276
276
  // catch で error へ引き継ぐ。
277
277
  try {
278
278
  if (!pipelineResult.success) {
279
- throw new SlideConvertRuntimeError(`pptx convert が失敗しました: ${formatPipelineErrors(pipelineResult.errors)}`, 'pptx-convert-failed');
279
+ throw new SlideConvertRuntimeError(`pptx convert failed: ${formatPipelineErrors(pipelineResult.errors)}`, 'pptx-convert-failed');
280
280
  }
281
281
  // staging/slides/<prefix><N>.pptx 群を読み込み、TS 側 merge ロジックで結合する。
282
282
  // staging から letter-spacing.json / href-map.json を auto-detect (priority: flag > staging > empty)。
@@ -321,7 +321,7 @@ dependencies) {
321
321
  // wrap しないと reason が unknown になり、利用者が原因を特定できない。
322
322
  const converted = error instanceof SlideConvertRuntimeError
323
323
  ? error
324
- : new SlideConvertRuntimeError(`PPTX の生成に失敗しました: ${formatError(error)}`, 'merge-failed');
324
+ : new SlideConvertRuntimeError(`PPTX generation failed: ${formatError(error)}`, 'merge-failed');
325
325
  throw withPipelineDiagnostics(converted, {
326
326
  warnings: pipelineResult.warnings,
327
327
  errors: pipelineResult.errors,
@@ -366,7 +366,7 @@ async function readSidecarObject(sourcePath, label) {
366
366
  text = await readFile(sourcePath, 'utf8');
367
367
  }
368
368
  catch (error) {
369
- throw new SlideConvertRuntimeError(`${label} を読み込めません (path: ${sourcePath}): ${formatError(error)}`, 'invalid-staging-json');
369
+ throw new SlideConvertRuntimeError(`cannot read ${label}: ${sourcePath}: ${formatError(error)}`, 'invalid-staging-json');
370
370
  }
371
371
  let raw;
372
372
  try {
@@ -374,10 +374,10 @@ async function readSidecarObject(sourcePath, label) {
374
374
  raw = JSON.parse(text);
375
375
  }
376
376
  catch (error) {
377
- throw new SlideConvertRuntimeError(`${label} が parse できません (path: ${sourcePath}): ${formatError(error)}`, 'invalid-staging-json');
377
+ throw new SlideConvertRuntimeError(`cannot parse ${label}: ${sourcePath}: ${formatError(error)}`, 'invalid-staging-json');
378
378
  }
379
379
  if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {
380
- throw new SlideConvertRuntimeError(`${label} は plain object である必要があります (path: ${sourcePath})`, 'invalid-staging-json');
380
+ throw new SlideConvertRuntimeError(`${label} must be a plain object: ${sourcePath}`, 'invalid-staging-json');
381
381
  }
382
382
  // eslint-disable-next-line no-restricted-syntax -- 直前の type guard 後の narrowing
383
383
  return raw;
@@ -394,14 +394,14 @@ async function resolveLetterSpacingMap(flagPath, stagingPath) {
394
394
  const map = new Map();
395
395
  for (const [key, value] of Object.entries(raw)) {
396
396
  if (typeof value !== 'object' || value === null || Array.isArray(value)) {
397
- throw new SlideConvertRuntimeError(`letter-spacing JSON の entry は object である必要があります (key: ${key})`, 'invalid-staging-json');
397
+ throw new SlideConvertRuntimeError(`letter-spacing JSON entry must be an object: ${key}`, 'invalid-staging-json');
398
398
  }
399
399
  // eslint-disable-next-line no-restricted-syntax -- entry value narrowing
400
400
  const entry = value;
401
401
  const letterSpacing = entry['letterSpacing'];
402
402
  const fontSize = entry['fontSize'];
403
403
  if (typeof letterSpacing !== 'string' || typeof fontSize !== 'string') {
404
- throw new SlideConvertRuntimeError(`letter-spacing JSON の entry は { letterSpacing: string, fontSize: string } である必要があります (key: ${key})`, 'invalid-staging-json');
404
+ throw new SlideConvertRuntimeError(`letter-spacing JSON entry must be { letterSpacing: string, fontSize: string }: ${key}`, 'invalid-staging-json');
405
405
  }
406
406
  map.set(key, { letterSpacing, fontSize });
407
407
  }
@@ -419,7 +419,7 @@ async function resolveHrefMap(flagPath, stagingPath) {
419
419
  const map = new Map();
420
420
  for (const [key, value] of Object.entries(raw)) {
421
421
  if (typeof value !== 'string') {
422
- throw new SlideConvertRuntimeError(`href JSON の entry は string である必要があります (key: ${key})`, 'invalid-staging-json');
422
+ throw new SlideConvertRuntimeError(`href JSON entry must be a string: ${key}`, 'invalid-staging-json');
423
423
  }
424
424
  map.set(key, value);
425
425
  }
@@ -444,17 +444,17 @@ async function resolveKeepTimingSteps(stagingPath) {
444
444
  const raw = await readSidecarObject(sourcePath, 'animation-policy JSON');
445
445
  const schemaVersion = raw['schemaVersion'];
446
446
  if (schemaVersion !== ANIMATION_POLICY_SCHEMA_VERSION) {
447
- const mismatch = `期待: ${String(ANIMATION_POLICY_SCHEMA_VERSION)}, 実際: ${String(schemaVersion)}, path: ${sourcePath}`;
448
- throw new SlideConvertRuntimeError(`animation-policy JSON の schemaVersion が一致しません (${mismatch})`, 'invalid-staging-json');
447
+ const mismatch = `expected ${String(ANIMATION_POLICY_SCHEMA_VERSION)}, got ${String(schemaVersion)}, path ${sourcePath}`;
448
+ throw new SlideConvertRuntimeError(`animation-policy JSON schemaVersion mismatch: ${mismatch}`, 'invalid-staging-json');
449
449
  }
450
450
  const steps = raw['keepTimingSteps'];
451
451
  if (!Array.isArray(steps)) {
452
- throw new SlideConvertRuntimeError(`animation-policy JSON の keepTimingSteps は配列である必要があります (path: ${sourcePath})`, 'invalid-staging-json');
452
+ throw new SlideConvertRuntimeError(`animation-policy JSON keepTimingSteps must be an array: ${sourcePath}`, 'invalid-staging-json');
453
453
  }
454
454
  const result = new Set();
455
455
  for (const step of steps) {
456
456
  if (typeof step !== 'number' || !Number.isSafeInteger(step)) {
457
- throw new SlideConvertRuntimeError(`animation-policy JSON の keepTimingSteps は整数の配列である必要があります (path: ${sourcePath})`, 'invalid-staging-json');
457
+ throw new SlideConvertRuntimeError(`animation-policy JSON keepTimingSteps must be an array of integers: ${sourcePath}`, 'invalid-staging-json');
458
458
  }
459
459
  result.add(step);
460
460
  }
@@ -495,7 +495,7 @@ dependencies) {
495
495
  const slidesDirectory = path.join(stagingDirectory, 'slides');
496
496
  const { inputs, originalSlideNumbers } = await loadSingleSlidePptxes(slidesDirectory, dependencies.archive);
497
497
  if (inputs.length === 0) {
498
- throw new SlideConvertRuntimeError(`pptx convert は成功扱いですが ${slidesDirectory} に slide-<N>.pptx が存在しません`, 'pptx-convert-failed');
498
+ throw new SlideConvertRuntimeError(`pptx convert reported success but no slide-<N>.pptx exists in ${slidesDirectory}`, 'pptx-convert-failed');
499
499
  }
500
500
  let merged;
501
501
  try {
@@ -503,7 +503,7 @@ dependencies) {
503
503
  }
504
504
  /* c8 ignore start -- mergePptxFiles 内部の throw は事前に inputs.length>0 で防御済 */
505
505
  catch (error) {
506
- throw new SlideConvertRuntimeError(`PPTX merge に失敗しました: ${formatError(error)}`, 'merge-failed');
506
+ throw new SlideConvertRuntimeError(`PPTX merge failed: ${formatError(error)}`, 'merge-failed');
507
507
  }
508
508
  /* c8 ignore stop */
509
509
  // mergePptxFiles の戻り値は、フラットな配列 (slide / rels / その他)。
@@ -707,10 +707,10 @@ function formatCacheSummary(cache) {
707
707
  const missSteps = cache.perStep.filter(entry => entry.cache === 'miss');
708
708
  const hitCount = cache.perStep.length - missSteps.length;
709
709
  if (missSteps.length === 0) {
710
- return `${summaryLine}cache steps: ${String(hitCount)} 件 hit\n`;
710
+ return `${summaryLine}cache steps: ${String(hitCount)} hit\n`;
711
711
  }
712
712
  const missList = missSteps.map(entry => `#${entry.key}`).join(', ');
713
- const hitSuffix = hitCount === 0 ? '' : ` (他 ${String(hitCount)} 件 hit)`;
713
+ const hitSuffix = hitCount === 0 ? '' : ` (${String(hitCount)} more hit)`;
714
714
  return `${summaryLine}cache steps: miss ${missList}${hitSuffix}\n`;
715
715
  }
716
716
  function doesArgvWantJson(argv) {
@@ -742,7 +742,7 @@ stderr) {
742
742
  // slides.md 不在 (ENOENT) は basename fallback の正常系のため警告しない。
743
743
  // それ以外の読取失敗 (permission 等) は診断を stderr に残す (stdout の JSON イベント契約を汚さない)。
744
744
  if (error.code !== 'ENOENT') {
745
- createDiagnostics(stderr).warning(`slides.md を読み取れないため既定出力名を basename から決定します`
745
+ createDiagnostics(stderr).warning(`cannot read slides.md; deriving the default output name from the basename`
746
746
  + ` (${slidesPath}): ${error.message}`);
747
747
  }
748
748
  });
@@ -814,18 +814,18 @@ function buildConvertDoneData(summary) {
814
814
  }
815
815
  export function createSlideConvertCommand(buildDependencies) {
816
816
  const command = new Command('convert')
817
- .description('Slidev プロジェクトを PPTX に変換する')
818
- .argument('<project-dir>', 'Slidev プロジェクトディレクトリ')
819
- .option('--out <path>', 'output .pptx path (省略時: <project-dir>/pptx/<slides.md の title | basename>.pptx)')
820
- .option('--theme <name>', 'slidev の --theme に渡す名前 (許容文字 [a-zA-Z0-9@/_.-])')
821
- .option('--spacing-json <path>', 'letter-spacing JSON path (省略時は staging/slides/letter-spacing.json を auto-detect)')
822
- .option('--href-json <path>', 'hyperlink JSON path (省略時は staging/slides/href-map.json を auto-detect)')
823
- .option('--transition-type <type>', 'transition 種別 (fade|morph)')
824
- .option('--transition-duration-ms <ms>', 'transition の duration (ms)')
817
+ .description('convert a Slidev project to PPTX')
818
+ .argument('<project-dir>', 'Slidev project directory')
819
+ .option('--out <path>', 'output .pptx path (default: <project-dir>/pptx/<slides.md title | basename>.pptx)')
820
+ .option('--theme <name>', 'name passed to slidev --theme (allowed characters: [a-zA-Z0-9@/_.-])')
821
+ .option('--spacing-json <path>', 'letter-spacing JSON path (default: auto-detect staging/slides/letter-spacing.json)')
822
+ .option('--href-json <path>', 'hyperlink JSON path (default: auto-detect staging/slides/href-map.json)')
823
+ .option('--transition-type <type>', 'transition type (fade|morph)')
824
+ .option('--transition-duration-ms <ms>', 'transition duration (ms)')
825
825
  .option('--morph-option <option>', 'morph option (byObject|byWord|byChar)')
826
- .option('--no-cache', 'キャッシュを読まずに全スライドを変換する(完了時にキャッシュは再構築される)')
827
- .option('--no-single-pass', '1 パスのルートを使わず、スライドのステップごとにページを開く従来ルートで変換する')
828
- .addOption(new Option('--log-level <level>', '進捗の詳しさ(verbose・debug は進捗を stderr に出す)').choices(['normal', 'verbose', 'debug']))
826
+ .option('--no-cache', 'convert all slides without reading the cache (the cache is rebuilt on completion)')
827
+ .option('--no-single-pass', 'convert with the per-step route that opens a page for each slide step, not the single-pass route')
828
+ .addOption(new Option('--log-level <level>', 'progress detail (verbose and debug write progress to stderr)').choices(['normal', 'verbose', 'debug']))
829
829
  .option('--json', 'emit machine-readable progress on stdout', false)
830
830
  .exitOverride()
831
831
  .configureOutput({
@@ -926,8 +926,8 @@ export function createSlideConvertCommand(buildDependencies) {
926
926
  + ` (${String(Math.round(summary.durationMs))}ms)`);
927
927
  // 0 件のときは出さない(除去が起きなかった run で行数を増やさない)。
928
928
  if (summary.animationTimingRemovedSlides > 0) {
929
- writeData(dependencies.stdout, `animation: ${String(summary.animationTimingRemovedSlides)} 枚のスライドから`
930
- + ` p:timing を除去しました (明示指定のあるスライドは保持)`);
929
+ writeData(dependencies.stdout, `animation: removed p:timing from ${String(summary.animationTimingRemovedSlides)} slides`
930
+ + ` (slides with an explicit setting are kept)`);
931
931
  }
932
932
  if (summary.cache !== undefined) {
933
933
  writeData(dependencies.stdout, formatCacheSummary(summary.cache));
@@ -978,7 +978,7 @@ function optionalTransitionType(raw, key) {
978
978
  if (value === undefined)
979
979
  return undefined;
980
980
  if (!isTransitionType(value)) {
981
- throw new SlideConvertUsageError(`option --${kebab(key)}: 受理可能なのは ${TRANSITION_TYPES.join('|')} のみ (指定値: ${value})`, 'invalid-transition-type');
981
+ throw new SlideConvertUsageError(`option --${kebab(key)} accepts only ${TRANSITION_TYPES.join('|')}: ${value}`, 'invalid-transition-type');
982
982
  }
983
983
  return value;
984
984
  }
@@ -987,7 +987,7 @@ function optionalMorphOption(raw, key) {
987
987
  if (value === undefined)
988
988
  return undefined;
989
989
  if (!isMorphOption(value)) {
990
- throw new SlideConvertUsageError(`option --${kebab(key)}: 受理可能なのは ${MORPH_OPTIONS.join('|')} のみ (指定値: ${value})`, 'invalid-morph-option');
990
+ throw new SlideConvertUsageError(`option --${kebab(key)} accepts only ${MORPH_OPTIONS.join('|')}: ${value}`, 'invalid-morph-option');
991
991
  }
992
992
  return value;
993
993
  }
@@ -997,7 +997,7 @@ function optionalPositiveInt(raw, key, reason) {
997
997
  return undefined;
998
998
  const parsed = Math.trunc(Number(value));
999
999
  if (!Number.isFinite(parsed) || parsed <= 0 || String(parsed) !== value.trim()) {
1000
- throw new SlideConvertUsageError(`option --${kebab(key)}: 正の整数のみ (指定値: ${value})`, reason);
1000
+ throw new SlideConvertUsageError(`option --${kebab(key)} must be a positive integer: ${value}`, reason);
1001
1001
  }
1002
1002
  return parsed;
1003
1003
  }
@@ -18,7 +18,7 @@ export async function collectTextViolations(items, lintText) {
18
18
  違反を人が読む形に整える。
19
19
  */
20
20
  export function formatTextViolations(violations) {
21
- const lines = violations.map(violation => ` - ${violation.item}: ${violation.message}(${violation.ruleId})`);
22
- return `文面の違反 ${violations.length.toString()} 件\n${lines.join('\n')}`;
21
+ const lines = violations.map(violation => ` - ${violation.item}: ${violation.message} (${violation.ruleId})`);
22
+ return `${violations.length.toString()} text violation(s)\n${lines.join('\n')}`;
23
23
  }
24
24
  //# sourceMappingURL=text-check.js.map
@@ -145,7 +145,7 @@ PDF の用紙寸法に使う。属性が無い・px 以外の単位 (%, pt, mm
145
145
  export function readSvgPixelSize(svg) {
146
146
  const match = ROOT_SVG_TAG_REGEX.exec(svg);
147
147
  if (match === null) {
148
- throw new Error('export された内容に SVG ルート要素がありません');
148
+ throw new Error('no SVG root element in the exported content');
149
149
  }
150
150
  return {
151
151
  width: readPixelAttribute(match[0], 'width'),
@@ -156,12 +156,12 @@ function readPixelAttribute(tag, name) {
156
156
  const attribute = (name === 'width' ? WIDTH_ATTRIBUTE_REGEX : HEIGHT_ATTRIBUTE_REGEX).exec(tag);
157
157
  const raw = attribute?.groups?.['value'];
158
158
  if (raw === undefined) {
159
- throw new Error(`SVG ルート要素に ${name} 属性がありません`);
159
+ throw new Error(`SVG root element has no ${name} attribute`);
160
160
  }
161
161
  const pixel = PIXEL_LENGTH_REGEX.exec(raw.trim())?.groups?.['number'];
162
162
  const value = pixel === undefined ? NaN : Number(pixel);
163
163
  if (!(value > 0)) {
164
- throw new Error(`SVG ルート要素の ${name} が px の正の値ではありません: ${raw}`);
164
+ throw new Error(`SVG root element ${name} is not a positive px value: ${raw}`);
165
165
  }
166
166
  return value;
167
167
  }
@@ -186,7 +186,7 @@ export function readSourceHash(svg) {
186
186
  function replaceRootSvgTag(svg, transform) {
187
187
  const match = ROOT_SVG_TAG_REGEX.exec(svg);
188
188
  if (match === null) {
189
- throw new Error('export された内容に SVG ルート要素がありません');
189
+ throw new Error('no SVG root element in the exported content');
190
190
  }
191
191
  // replacement は data URI や style 値をそのまま含むため、`$&` 等の展開が起きない
192
192
  // 関数形式で渡す。
@@ -54,7 +54,7 @@ function expandedDocument(id, data) {
54
54
  expanded = undefined;
55
55
  }
56
56
  if (expanded === undefined) {
57
- throw new Error(`圧縮された図 (diagram id="${id}") を展開できないため、文言を確認できません`);
57
+ throw new Error(`cannot check the text: compressed diagram (id="${id}") could not be expanded`);
58
58
  }
59
59
  return expanded;
60
60
  }