rpg-engine 0.20.0 → 0.22.0

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 (194) hide show
  1. package/dist/adventures/index.d.ts +1 -1
  2. package/dist/adventures/index.js +1 -1
  3. package/dist/adventures/source.d.ts +3 -0
  4. package/dist/adventures/source.js +11 -49
  5. package/dist/campaign/create-campaign.d.ts +1 -1
  6. package/dist/campaign/create-campaign.js +3 -2
  7. package/dist/campaign/find-campaign.d.ts +2 -0
  8. package/dist/campaign/find-campaign.js +2 -0
  9. package/dist/campaign/host-files.js +4 -1
  10. package/dist/campaign/index.d.ts +3 -2
  11. package/dist/campaign/index.js +3 -2
  12. package/dist/campaign/port.d.ts +6 -0
  13. package/dist/campaign/port.js +24 -0
  14. package/dist/campaign/settings.d.ts +17 -0
  15. package/dist/campaign/settings.js +26 -3
  16. package/dist/cli/cli.js +15 -0
  17. package/dist/commands/book.d.ts +16 -35
  18. package/dist/commands/book.js +86 -62
  19. package/dist/commands/config/config.js +16 -2
  20. package/dist/commands/config/dashboard.d.ts +6 -2
  21. package/dist/commands/config/dashboard.js +45 -8
  22. package/dist/commands/config/shown.js +4 -0
  23. package/dist/commands/config/words.d.ts +3 -1
  24. package/dist/commands/config/words.js +29 -2
  25. package/dist/commands/image.d.ts +5 -0
  26. package/dist/commands/image.js +6 -3
  27. package/dist/commands/mode.d.ts +1 -1
  28. package/dist/commands/package/data.d.ts +35 -0
  29. package/dist/commands/package/data.js +144 -0
  30. package/dist/commands/package/here.d.ts +7 -2
  31. package/dist/commands/package/here.js +23 -11
  32. package/dist/commands/package/install.js +14 -15
  33. package/dist/commands/package/language.d.ts +15 -0
  34. package/dist/commands/package/language.js +109 -0
  35. package/dist/commands/package/package.js +20 -10
  36. package/dist/commands/package/result.d.ts +19 -0
  37. package/dist/commands/package/theme.d.ts +13 -0
  38. package/dist/commands/package/theme.js +67 -0
  39. package/dist/commands/package/uninstall.d.ts +4 -1
  40. package/dist/commands/package/uninstall.js +29 -9
  41. package/dist/commands/scene/close.d.ts +1 -1
  42. package/dist/commands/scene/close.js +15 -8
  43. package/dist/commands/scene/scene.js +6 -1
  44. package/dist/commands/shared/books/adventures.d.ts +1 -4
  45. package/dist/commands/shared/books/adventures.js +3 -32
  46. package/dist/commands/shared/books/words.js +3 -2
  47. package/dist/commands/shared/campaign/book.d.ts +21 -8
  48. package/dist/commands/shared/campaign/book.js +65 -42
  49. package/dist/commands/shared/campaign/git.d.ts +25 -0
  50. package/dist/commands/shared/campaign/git.js +104 -0
  51. package/dist/commands/shared/campaign/saves.js +7 -3
  52. package/dist/commands/shared/campaign/world.js +2 -1
  53. package/dist/commands/shared/packages/catalog.d.ts +3 -3
  54. package/dist/commands/shared/packages/catalog.js +118 -43
  55. package/dist/commands/shared/packages/unpacked.d.ts +50 -0
  56. package/dist/commands/shared/packages/unpacked.js +146 -0
  57. package/dist/commands/status.d.ts +1 -0
  58. package/dist/commands/status.js +8 -4
  59. package/dist/core/archive.d.ts +13 -0
  60. package/dist/core/archive.js +76 -0
  61. package/dist/core/context.d.ts +4 -0
  62. package/dist/core/context.js +1 -0
  63. package/dist/core/store.d.ts +5 -1
  64. package/dist/core/store.js +15 -2
  65. package/dist/core/version.d.ts +2 -0
  66. package/dist/core/version.js +5 -0
  67. package/dist/dashboard/api.js +24 -1
  68. package/dist/dashboard/app.js +7 -2
  69. package/dist/dashboard/guide/ar.md +11 -9
  70. package/dist/dashboard/guide/cs.md +11 -9
  71. package/dist/dashboard/guide/da.md +12 -10
  72. package/dist/dashboard/guide/de.md +13 -11
  73. package/dist/dashboard/guide/el.md +11 -9
  74. package/dist/dashboard/guide/en.md +10 -8
  75. package/dist/dashboard/guide/es.md +11 -9
  76. package/dist/dashboard/guide/fi.md +11 -9
  77. package/dist/dashboard/guide/fr.md +11 -9
  78. package/dist/dashboard/guide/he.md +11 -9
  79. package/dist/dashboard/guide/hi.md +11 -9
  80. package/dist/dashboard/guide/hu.md +11 -9
  81. package/dist/dashboard/guide/is.md +11 -9
  82. package/dist/dashboard/guide/it.md +11 -9
  83. package/dist/dashboard/guide/ja.md +12 -10
  84. package/dist/dashboard/guide/ko.md +11 -9
  85. package/dist/dashboard/guide/nb.md +12 -10
  86. package/dist/dashboard/guide/nl.md +11 -9
  87. package/dist/dashboard/guide/pl.md +11 -9
  88. package/dist/dashboard/guide/pt.md +11 -9
  89. package/dist/dashboard/guide/ro.md +11 -9
  90. package/dist/dashboard/guide/ru.md +12 -10
  91. package/dist/dashboard/guide/sv.md +11 -9
  92. package/dist/dashboard/guide/tr.md +11 -9
  93. package/dist/dashboard/guide/uk.md +12 -10
  94. package/dist/dashboard/guide/zh.md +11 -9
  95. package/dist/dashboard/i18n/ar.json +58 -5
  96. package/dist/dashboard/i18n/cs.json +58 -5
  97. package/dist/dashboard/i18n/da.json +58 -5
  98. package/dist/dashboard/i18n/de.json +58 -5
  99. package/dist/dashboard/i18n/el.json +58 -5
  100. package/dist/dashboard/i18n/es.json +58 -5
  101. package/dist/dashboard/i18n/fi.json +58 -5
  102. package/dist/dashboard/i18n/fr.json +58 -5
  103. package/dist/dashboard/i18n/he.json +58 -5
  104. package/dist/dashboard/i18n/hi.json +58 -5
  105. package/dist/dashboard/i18n/hu.json +58 -5
  106. package/dist/dashboard/i18n/is.json +58 -5
  107. package/dist/dashboard/i18n/it.json +58 -5
  108. package/dist/dashboard/i18n/ja.json +58 -5
  109. package/dist/dashboard/i18n/ko.json +58 -5
  110. package/dist/dashboard/i18n/nb.json +58 -5
  111. package/dist/dashboard/i18n/nl.json +58 -5
  112. package/dist/dashboard/i18n/pl.json +58 -5
  113. package/dist/dashboard/i18n/pt.json +58 -5
  114. package/dist/dashboard/i18n/ro.json +58 -5
  115. package/dist/dashboard/i18n/ru.json +58 -5
  116. package/dist/dashboard/i18n/sv.json +58 -5
  117. package/dist/dashboard/i18n/tr.json +58 -5
  118. package/dist/dashboard/i18n/uk.json +58 -5
  119. package/dist/dashboard/i18n/zh.json +58 -5
  120. package/dist/dashboard/journal/book.js +3 -2
  121. package/dist/dashboard/journal/journal.js +8 -5
  122. package/dist/dashboard/kit.js +1 -1
  123. package/dist/dashboard/packages/catalog.js +31 -14
  124. package/dist/dashboard/packages/engine.js +46 -2
  125. package/dist/dashboard/packages/installed.js +13 -0
  126. package/dist/dashboard/packages/outcomes.js +21 -0
  127. package/dist/dashboard/packages/packages.js +41 -18
  128. package/dist/dashboard/packages/rows.js +3 -1
  129. package/dist/dashboard/parts/icons.js +3 -0
  130. package/dist/dashboard/parts/labels.js +7 -0
  131. package/dist/dashboard/parts/picture.js +89 -0
  132. package/dist/dashboard/parts/refusals.js +8 -1
  133. package/dist/dashboard/parts/widgets.js +2 -1
  134. package/dist/dashboard/play/scene.js +8 -5
  135. package/dist/dashboard/settings/settings.js +55 -18
  136. package/dist/dashboard/sheet/party.js +5 -2
  137. package/dist/dashboard/sheet/sheet.js +2 -1
  138. package/dist/dashboard/shell/notices.js +2 -2
  139. package/dist/dashboard/shell/system-style.js +132 -15
  140. package/dist/dashboard/shell/tooltip.js +224 -0
  141. package/dist/dashboard/style.css +497 -193
  142. package/dist/dashboard/world/lore.js +4 -3
  143. package/dist/dashboard/world/place-card.js +2 -1
  144. package/dist/git/git.d.ts +12 -0
  145. package/dist/git/git.js +175 -0
  146. package/dist/git/ignore.d.ts +2 -0
  147. package/dist/git/ignore.js +16 -0
  148. package/dist/git/index.d.ts +2 -0
  149. package/dist/git/index.js +2 -0
  150. package/dist/importer/index.d.ts +1 -1
  151. package/dist/importer/index.js +1 -1
  152. package/dist/languages/index.d.ts +1 -1
  153. package/dist/languages/index.js +1 -1
  154. package/dist/languages/pack.d.ts +4 -1
  155. package/dist/languages/pack.js +18 -6
  156. package/dist/packages/engine.d.ts +7 -0
  157. package/dist/packages/engine.js +32 -1
  158. package/dist/packages/index.d.ts +1 -1
  159. package/dist/packages/index.js +1 -1
  160. package/dist/server/bell-listener.d.ts +2 -1
  161. package/dist/server/bell-listener.js +10 -41
  162. package/dist/server/dashboard/engine.d.ts +18 -0
  163. package/dist/server/dashboard/engine.js +31 -0
  164. package/dist/server/dashboard/files.d.ts +11 -3
  165. package/dist/server/dashboard/files.js +66 -17
  166. package/dist/server/dashboard/index.d.ts +18 -2
  167. package/dist/server/dashboard/index.js +62 -23
  168. package/dist/server/dashboard/news.d.ts +3 -2
  169. package/dist/server/dashboard/news.js +19 -5
  170. package/dist/server/dashboard/pictures.d.ts +7 -0
  171. package/dist/server/dashboard/pictures.js +62 -0
  172. package/dist/server/dashboard/ports.d.ts +17 -2
  173. package/dist/server/dashboard/ports.js +60 -4
  174. package/dist/server/dashboard/writes.d.ts +5 -3
  175. package/dist/server/dashboard/writes.js +45 -14
  176. package/dist/server/mcp.d.ts +3 -2
  177. package/dist/server/mcp.js +55 -11
  178. package/dist/testing/index.js +1 -0
  179. package/dist/themes/css.d.ts +1 -1
  180. package/dist/themes/css.js +101 -2
  181. package/dist/themes/index.d.ts +2 -1
  182. package/dist/themes/index.js +4 -2
  183. package/dist/themes/installed.d.ts +14 -0
  184. package/dist/themes/installed.js +28 -0
  185. package/dist/themes/theme.d.ts +38 -0
  186. package/dist/themes/theme.js +192 -13
  187. package/instructions/core.md +4 -3
  188. package/instructions/dashboard-guide.md +2 -1
  189. package/instructions/mentor-hints.md +1 -1
  190. package/instructions/mentor-tutorial.md +1 -1
  191. package/instructions/party.md +1 -1
  192. package/instructions/play.md +2 -2
  193. package/package.json +1 -1
  194. package/systems/free/instructions/outcomes-told.md +1 -1
@@ -41,8 +41,8 @@
41
41
  "{name} {version} needs a newer RPG Engine: update it in Installed.": "{name} {version} 需要更新版本的 RPG Engine,请在“已安装”中更新。",
42
42
  "{name} {version} was made for an older RPG Engine: look for a newer version of it.": "{name} {version} 是为旧版 RPG Engine 制作的,请找一个更新的版本。",
43
43
  "{name} brings changes to the game system that cannot be used as they are written: whoever made it has to fix them.": "{name} 带来的游戏系统修改无法按现有写法使用,需要由作者修正。",
44
+ "{name} cannot be used, and is not on this computer: {why}": "{name} 无法使用,也不在这台电脑上:{why}",
44
45
  "{name} cannot be used, and version {version} stays: {why}": "{name} 无法使用,将保留 {version} 版:{why}",
45
- "{name} cannot be used, and was taken off this computer: {why}": "{name} 无法使用,已从这台电脑上移除:{why}",
46
46
  "{name} changes something of the game system that is in the scene being played: try again once the scene is over.": "{name} 修改了当前场景中正在使用的游戏系统内容,请在场景结束后再试。",
47
47
  "{name} does not read: it is not a package's .zip or .tgz.": "无法读取 {name},它不是包的 .zip 或 .tgz 文件。",
48
48
  "{name} found out": "{name}发现了",
@@ -60,7 +60,10 @@
60
60
  "{name} is neither a .zip nor a .tgz.": "{name} 既不是 .zip 也不是 .tgz 文件。",
61
61
  "{name} is no book RPG Engine reads: give a {kinds} file, or a folder of them.": "RPG Engine 无法读取 {name},请提供 {kinds} 文件,或包含这些文件的文件夹。",
62
62
  "{name} is no full path: write it from its drive or its root.": "{name} 不是完整路径,请从盘符或根目录开始写。",
63
+ "{name} is no package: it has no adventure.yaml, theme.yaml or language.yaml at its top. A document is imported by the master.": "{name} 不是包:其顶层没有 adventure.yaml、theme.yaml 或 language.yaml。文档需由主持人导入。",
64
+ "{name} is no theme the page can use: {why}": "{name} 不是页面可用的主题:{why}",
63
65
  "{name} is not a package for RPG Engine.": "{name} 不是 RPG Engine 的包。",
66
+ "{name} is not a PNG, JPEG, WebP or SVG picture.": "{name} 不是 PNG、JPEG、WebP 或 SVG 图片。",
64
67
  "{name} is not an adventure: it has no adventure.yaml at its top. A document is imported by the master.": "{name} 不是冒险:顶层没有 adventure.yaml。文档需要由主持人导入。",
65
68
  "{name} is not on this computer.": "这台电脑上没有 {name}。",
66
69
  "{name} is not the name of an npm package.": "{name} 不是有效的 npm 包名。",
@@ -83,6 +86,8 @@
83
86
  "{name}'s turn": "{name}的回合",
84
87
  "{names} found out": "{names}发现了",
85
88
  "{number} of {count}": "第 {number} 章,共 {count} 章",
89
+ "{page} comes from the game system, with its own picture.": "{page} 来自游戏系统,自带图片。",
90
+ "{page} has your picture now.": "{page} 已换上你的图片。",
86
91
  "{page} is no longer changed in this campaign: there is nothing to put back.": "{page} 在本战役中已没有修改,无需恢复。",
87
92
  "{path}: in this campaign": "{path}:用于本战役",
88
93
  "{place}, on {map}": "{map}上的{place}",
@@ -121,6 +126,8 @@
121
126
  "a campaign with no set end, one adventure after another": "没有固定结局的战役,一场冒险接着一场",
122
127
  "a central threat that advances by stages, your character's own story woven in": "一个分阶段推进的核心威胁,并融入你的角色自身的故事",
123
128
  "A change counts at once, from now on: what is already in play stays as it is. The master hears of it at their next move, and of nothing you put back as it was.": "更改立即生效,从现在起适用:已在进行中的内容保持不变。主持人会在下次行动时得知更改;你改回原样的内容,主持人不会收到任何消息。",
129
+ "a commit at the start of each session, at each save and at each end of a scene": "每次开局、每次存档以及每个场景结束时提交一次",
130
+ "a commit at the start of each session, at each save and at each end of a scene, then a push": "每次开局、每次存档以及每个场景结束时提交一次,然后推送",
124
131
  "a creature": "某个生物",
125
132
  "A day a week": "每周一天",
126
133
  "a day of the story for each day you are away: when you come back, at your first move the master lets it pass and tells what the world did meanwhile": "你每离开一天,故事就过去一天:你回来后的第一步行动时,主持人会让这段时间流逝,并讲述这期间世界发生了什么",
@@ -148,6 +155,8 @@
148
155
  "Add a coin": "加一枚硬币",
149
156
  "Add a coin: {count} chosen": "加一枚硬币:已选 {count} 枚",
150
157
  "add a die to the die {condition}": "{condition}时给该骰子追加一次掷骰",
158
+ "Add a picture: {page}": "添加图片:{page}",
159
+ "Add a picture…": "添加图片…",
151
160
  "Add to {setting}": "添加到{setting}",
152
161
  "Add what you know, e.g. Initiative": "添加你已了解的,例如先攻",
153
162
  "Add, e.g. leave one alive": "添加,例如:留一个活口",
@@ -244,6 +253,8 @@
244
253
  "challenge": "挑战",
245
254
  "Change it in Settings.": "可在设置中更改。",
246
255
  "Change the campaign's name": "修改战役名称",
256
+ "Change the picture: {page}": "更换图片:{page}",
257
+ "Change the picture…": "更换图片…",
247
258
  "Change the rules": "更改规则",
248
259
  "Change what you sent": "修改已发送的内容",
249
260
  "Changed in this campaign": "本战役中已修改",
@@ -253,6 +264,7 @@
253
264
  "Chapter {number}": "第{number}章",
254
265
  "Chapters": "章节",
255
266
  "Character voices": "角色配音",
267
+ "Chats in the repository": "仓库中的聊天记录",
256
268
  "Checkpoint": "存档点",
257
269
  "Checks": "检定",
258
270
  "Choice {n} of {count}": "第 {n} 项选择,共 {count} 项",
@@ -287,6 +299,8 @@
287
299
  "Coins": "硬币",
288
300
  "Column": "侧栏",
289
301
  "combat": "战斗",
302
+ "Commit": "提交",
303
+ "Commit and push": "提交并推送",
290
304
  "Companion": "同伴",
291
305
  "Companions": "同伴",
292
306
  "Completed": "已完成",
@@ -366,6 +380,7 @@
366
380
  "Each campaign then turns on its own; the master searches them after the game system, citing the book and the page.": "之后每个战役会启用各自使用的文件夹;主持人会在查阅游戏系统之后再查阅这些文件夹,并注明书名和页码。",
367
381
  "each part at its own level, chosen below": "每一项各用自己的等级,在下方选择",
368
382
  "each rule explained the first time, the numbers shown, a short review after fights": "每条规则首次出现时讲解,显示数字,战斗后简短回顾",
383
+ "each save's zip too, which makes the repository grow quickly": "同时纳入每个存档的 zip 文件,仓库会迅速变大",
369
384
  "east": "东",
370
385
  "east-north-east": "东北偏东",
371
386
  "east-south-east": "东南偏东",
@@ -384,6 +399,7 @@
384
399
  "Everyone": "所有人",
385
400
  "Everything that happened since is gone from the story, and so is every save after it, your character too.": "此后发生的一切都会从故事中消失,之后的所有存档也一样,包括你的角色。",
386
401
  "Everything that happened since is gone from the story, and so is every save after it.": "此后发生的一切都会从故事中消失,之后的所有存档也一样。",
402
+ "everything you wrote to the master: keep the repository private": "你对主持人写的全部内容:请将仓库设为私有",
387
403
  "exploration": "探索",
388
404
  "Export": "导出",
389
405
  "Export…": "导出…",
@@ -434,6 +450,7 @@
434
450
  "Game system": "游戏系统",
435
451
  "Game systems, extensions and languages come from npm: a file, a link or a folder can be added all the same.": "游戏系统、扩展和语言来自 npm;也可以通过文件、链接或文件夹添加。",
436
452
  "Gear and lightning": "齿轮与闪电",
453
+ "Git": "Git",
437
454
  "GitHub does not answer.": "GitHub 没有响应。",
438
455
  "GitHub is the site where RPG Engine is made: you write there with a free account, as in a forum, and anyone can read it.": "GitHub 是制作 RPG Engine 的网站:用免费账号就能在上面发帖,就像在论坛里一样,任何人都能看到。",
439
456
  "github.com/someone/an-adventure": "github.com/someone/an-adventure",
@@ -454,11 +471,12 @@
454
471
  "held: {count}": "待定:{count}",
455
472
  "Help": "帮助",
456
473
  "Here": "此处",
457
- "Here the master writes the story as a book: a chapter for each scene, once it ends.": "主持人会把故事写成一本书:每个场景结束后,就成为一章。",
474
+ "Here the master writes the story as a book: a chapter each time the story turns.": "主持人会把故事写成一本书:故事每有转折,就添一章。",
458
475
  "hidden": "隐藏",
459
476
  "Hidden": "隐藏",
460
477
  "hidden: the master tells you only what comes of them": "隐藏:主持人只告诉你结果",
461
478
  "Hide the panel": "隐藏面板",
479
+ "Hide until the next version": "下个版本前不再提示",
462
480
  "High": "最高",
463
481
  "highest of {count}": "{count}个中取最高",
464
482
  "Hills": "丘陵",
@@ -516,6 +534,7 @@
516
534
  "In use · chosen in the setup": "使用中 · 在设置时选定",
517
535
  "In view": "明骰",
518
536
  "In your words": "自定义",
537
+ "Included": "纳入",
519
538
  "Inn": "旅店",
520
539
  "Inscription": "铭文",
521
540
  "Inside": "内部",
@@ -529,17 +548,20 @@
529
548
  "it asks for a password to open: save a copy without one.": "打开需要密码:请另存一份无密码的副本。",
530
549
  "It asks whether code that RPG Engine did not publish may run here. Can't see it? It is behind the browser.": "它会询问是否允许运行并非 RPG Engine 发布的代码。看不到窗口?它在浏览器后面。",
531
550
  "It asks whether RPG Engine may read the documents of that folder. Can't see it? It is behind the browser.": "它会询问 RPG Engine 是否可以读取该文件夹中的文档。没看到?它在浏览器后面。",
551
+ "It asks whether to update RPG Engine on this computer. Can't see it? It is behind the browser.": "窗口会询问是否在这台电脑上更新 RPG Engine。没看到?它可能在浏览器后面。",
532
552
  "It can be put back once the scene being played is over.": "当前场景结束后即可恢复。",
533
553
  "It cannot be undone from this page: ask the master to write it again.": "在此页面无法撤销,请让主持人重新写入。",
534
554
  "It did not reach the game: try again.": "没有发送到游戏:请重试。",
555
+ "It does not pass the page's checks: Settings does not offer it.": "它未通过页面的检查,设置中不会提供。",
535
556
  "It does not read: install it again.": "无法读取:请重新安装。",
536
557
  "it does not read: the file is damaged, or is not what its name says.": "无法读取:文件已损坏,或与文件名不符。",
537
558
  "It goes off this computer, and out of this campaign. Another campaign that uses it asks to install it again.": "它会从本机和本战役中移除。其他使用它的战役会提示你重新安装。",
538
559
  "It goes off this computer: a new campaign can no longer choose it. This campaign does not change.": "它将从本机移除:新战役将无法再选择它。本战役不受影响。",
539
560
  "It goes off this computer: the dashboard goes back to its own words in this language.": "它将从本机移除:面板会恢复该语言的原有文字。",
561
+ "It goes off this computer: where you chose it, the page goes back to the game's style, or its own.": "它会从这台电脑上移除:你选用它的地方,页面将恢复为游戏的风格或页面自带的风格。",
540
562
  "it is locked by DRM, which RPG Engine never opens.": "文件受 DRM 保护,RPG Engine 无法打开。",
541
563
  "it stopped the reader twice: too big or damaged, or kept busy by another program. Close that program, or save the file again.": "读取器两次中断:文件太大或已损坏,或被其他程序占用。请关闭该程序,或重新保存文件。",
542
- "It tells the kind by itself: a game system, an adventure, an extension or a language. A file is a .zip or a .tgz.": "类型会自动识别:游戏系统、冒险、扩展或语言。文件为 .zip 或 .tgz。",
564
+ "It tells the kind by itself: a game system, an adventure, an extension, a theme or a language. A file is a .zip or a .tgz.": "类型会自动识别:游戏系统、冒险、扩展、主题或语言。文件为 .zip 或 .tgz。",
543
565
  "It's {name}'s turn": "轮到{name}",
544
566
  "It's the turn of": "轮到",
545
567
  "Item": "物品",
@@ -555,6 +577,7 @@
555
577
  "keep the {count} lowest": "保留最低的{count}个",
556
578
  "keep the highest": "保留最高的",
557
579
  "keep the lowest": "保留最低的",
580
+ "Keep the repository private. It holds the log of your sessions and your user's name on this computer; with the chats in, everything you wrote to the master too.": "请将仓库设为私有。里面有你的会话记录和你在这台电脑上的用户名;如果包含聊天记录,还有你对主持人说过的一切。",
558
581
  "Keeping {what}": "维持 {what}",
559
582
  "Kept in this browser alone.": "仅保存在此浏览器中。",
560
583
  "Key": "图例",
@@ -566,6 +589,7 @@
566
589
  "Learned": "已讲解",
567
590
  "Learning the game": "学习游戏",
568
591
  "left": "剩余",
592
+ "Left out": "不纳入",
569
593
  "Left to the master: {settings}.": "交给主持人:{settings}。",
570
594
  "Left to the master: they choose, and tell you.": "交给主持人:由主持人决定并告诉你。",
571
595
  "Legend": "图例",
@@ -657,10 +681,12 @@
657
681
  "No scene of the story on this day.": "这一天没有故事场景。",
658
682
  "No set end": "无固定终点",
659
683
  "No window for your yes opens on this computer: add it from your terminal, in the campaign's folder.": "这台电脑上无法打开确认窗口:请在战役文件夹中通过终端添加。",
684
+ "No window for your yes opens on this computer: update RPG Engine from a terminal.": "这台电脑无法弹出确认窗口,请在终端中更新 RPG Engine。",
660
685
  "None": "无",
661
686
  "None open now.": "目前没有未完成的。",
662
687
  "None yet: add one in Add, from the catalog, a .zip or a link.": "暂无:在“添加”中从目录、.zip 文件或链接添加。",
663
688
  "None yet: add the folder of your manuals.": "还没有:添加你的规则书文件夹吧。",
689
+ "None: a theme changes the page's colours, faces and pictures, in every campaign; you find them in Add, in the catalog.": "暂无:主题会改变页面的颜色、字体和图片,适用于所有战役;可在“添加”的目录中找到。",
664
690
  "None: an extension adds rules and tools to the game; you find them in Add, in the catalog.": "暂无:扩展可为游戏增添规则和工具,你可以在“添加”的目录中找到。",
665
691
  "None: nothing kept out.": "无:不排除任何内容。",
666
692
  "None. The dashboard has its own languages; a language package takes the place of one with a translation made by hand.": "暂无。面板自带多种语言;语言包可替换其中一种,用手工翻译取代原有译文。",
@@ -689,6 +715,7 @@
689
715
  "Nothing was added.": "没有添加任何内容。",
690
716
  "Nothing your character knows matches “{search}”.": "角色所知中没有与“{search}”匹配的内容。",
691
717
  "Nothing your character knows of is due on this day.": "你的角色所知的事物中,没有在这一天到期的。",
718
+ "nothing: you keep the repository yourself": "不做任何操作:仓库由你自己管理",
692
719
  "Notice": "告示",
693
720
  "Now": "现在",
694
721
  "Now acting": "当前行动",
@@ -726,7 +753,7 @@
726
753
  "One package at a time: wait for the one under way, then try again.": "一次只能处理一个包:请等当前的完成后再试。",
727
754
  "Only the highest {die} counts": "只计最高的{die}",
728
755
  "Only the lowest {die} counts": "只计最低的{die}",
729
- "only the story; ask in brackets whenever you want": "只有故事;想问时用括号提问",
756
+ "only the story; ask in [OOC: …] whenever you want": "只讲故事;想提问时随时用 [OOC: …]",
730
757
  "only when all is lost: back to the end of the last scene": "仅在全盘皆输时使用:回到上一个场景的结尾",
731
758
  "only when the story turns on them": "仅当故事取决于它们时",
732
759
  "Onyx": "缟玛瑙",
@@ -832,6 +859,7 @@
832
859
  "Rounded": "圆润",
833
860
  "RPG Engine {version} is installed already: it comes with a new chat.": "RPG Engine {version} 已安装,新开聊天后生效。",
834
861
  "RPG Engine {version} is installed.": "RPG Engine {version} 已安装。",
862
+ "RPG Engine {version} is out.": "RPG Engine {version} 已发布。",
835
863
  "RPG Engine {version} is the latest: there is nothing to update.": "RPG Engine {version} 已是最新版本,无需更新。",
836
864
  "RPG Engine cannot use {name}, and took it off this computer again.": "RPG Engine 无法使用 {name},已将它从这台电脑上移除。",
837
865
  "RPG Engine was not updated.": "RPG Engine 未更新。",
@@ -849,7 +877,9 @@
849
877
  "Saved {when}": "存档于{when}",
850
878
  "Saved.": "已存档。",
851
879
  "Saves": "存档",
880
+ "Saves in the repository": "仓库中的存档",
852
881
  "Scene": "场景",
882
+ "Scene {number}": "场景 {number}",
853
883
  "Scroll": "卷轴",
854
884
  "Search": "搜索",
855
885
  "Search a language…": "搜索语言…",
@@ -862,10 +892,12 @@
862
892
  "See RPG Engine": "查看 RPG Engine",
863
893
  "Send": "发送",
864
894
  "Send to the master": "发送给主持人",
895
+ "Sending…": "正在发送…",
865
896
  "Sent to the master: they write it in your page once you agree in the chat.": "已发送给主持人:在聊天中商定后,主持人会把它写进你的页面。",
866
897
  "Session zero": "零号团",
867
898
  "Setting up {campaign}": "正在准备{campaign}",
868
899
  "Settings": "设置",
900
+ "Settings never show it, so you can always turn it off here.": "设置里不会显示它,所以你随时可以在这里关闭。",
869
901
  "Share": "分享",
870
902
  "Share again": "再次分享",
871
903
  "Share it again with the master": "再次分享给主持人",
@@ -963,7 +995,7 @@
963
995
  "The campaign starts over.": "战役重新开始。",
964
996
  "The campaign's name": "战役名称",
965
997
  "The catalog does not answer.": "目录没有响应。",
966
- "The catalog's adventures come from GitHub: a .zip or a link can be added all the same.": "目录中的冒险来自 GitHub;也可以通过 .zip 文件或链接添加。",
998
+ "The catalog's adventures and themes come from GitHub: a .zip or a link can be added all the same.": "目录中的冒险和主题来自 GitHub,也可以通过 .zip 或链接添加。",
967
999
  "The change did not reach the game: try again.": "更改没有发送到游戏:请重试。",
968
1000
  "The checks the master asks of you come here, and the master's rolls you may see.": "主持人要你做的检定会出现在这里,你能看到的主持人掷骰也在这里。",
969
1001
  "The choices": "选择",
@@ -971,6 +1003,8 @@
971
1003
  "The code of {name} does not work: {why}": "{name} 的代码无法运行:{why}",
972
1004
  "the colours, faces and pictures of {name}, from the game system": "{name}的颜色、字体和图片,来自游戏系统",
973
1005
  "the colours, faces and pictures of the game system": "游戏系统的颜色、字体和图片",
1006
+ "the colours, faces and pictures: a theme you installed, or the page's own": "颜色、字体和图片:你安装的主题,或页面自带的",
1007
+ "the colours, faces and pictures: the game system's, a theme you installed, or the page's own": "颜色、字体和图片:游戏系统的、你安装的主题,或页面自带的",
974
1008
  "the column": "侧栏",
975
1009
  "The dashboard of the campaign, beside the chat where you play.": "战役仪表盘,就在你游玩的聊天旁边。",
976
1010
  "The day's upkeep": "每日消耗",
@@ -1007,6 +1041,8 @@
1007
1041
  "the language of this page": "本页面的语言",
1008
1042
  "the language the master plays in, and the page's too when it is translated": "主持人游戏时使用的语言;页面若已翻译,也使用该语言",
1009
1043
  "The last chapter": "最新一章",
1044
+ "The last commit failed; the game goes on all the same. Ask the master to look at it. ({why})": "上一次提交失败了,但游戏照常进行。请让主持人看一下。({why})",
1045
+ "The last push failed: the campaign is safe on this computer, only its copy online is behind. Ask the master to look at it. ({why})": "上一次推送失败了:战役已安全保存在这台电脑上,只是在线副本没有同步。请让主持人看一下。({why})",
1010
1046
  "The master": "主持人",
1011
1047
  "The master asks you in the chat which tool to use.": "主持人会在聊天中问你使用哪个工具。",
1012
1048
  "The master goes on with {version} in this chat. To play with {next}:": "在这个聊天中,主持人继续使用 {version}。要使用 {next} 来玩:",
@@ -1046,11 +1082,13 @@
1046
1082
  "the page's look": "页面外观",
1047
1083
  "The pages this option names": "此选项所指的页面",
1048
1084
  "The party is in no place the character knows, as on a road between two.": "队伍不在角色所知的任何地点,比如在两地之间的路上。",
1085
+ "The picture is more than {size} MB: make it smaller.": "图片超过 {size} MB,请压缩后再试。",
1049
1086
  "the pictures of places, quests and those you meet, made on this computer": "在这台电脑上生成的地点、任务和所遇之人的图片",
1050
1087
  "the pictures on your coins, heads first": "硬币上的图案,先正面后反面",
1051
1088
  "The players' roll:": "玩家的掷骰:",
1052
1089
  "The quest you follow": "你追踪的任务",
1053
1090
  "The quests you follow": "你正在进行的任务",
1091
+ "the repository keeps the story without them": "仓库中的故事不受它们影响",
1054
1092
  "The save's name, if you like": "存档名称,随你喜欢",
1055
1093
  "The square, such as E4": "格子,例如 E4",
1056
1094
  "The start": "开端",
@@ -1061,7 +1099,9 @@
1061
1099
  "The story starts on day {day}": "故事始于第{day}天",
1062
1100
  "The story starts on day {day}, {time}": "故事始于第{day}天{time}",
1063
1101
  "The story starts with the first scene.": "故事从第一个场景开始。",
1102
+ "the style of this page": "本页面的风格",
1064
1103
  "The text above lies behind the master's screen, forbidden to the players' eyes.": "以上文字位于主持人的屏风之后,玩家不得窥视。",
1104
+ "The theme is on this computer, for every campaign: choose it in Settings, under Game style.": "主题已存放在这台电脑上,适用于所有战役:请在“设置”的“游戏风格”中选择。",
1065
1105
  "The title of the note {title}": "笔记“{title}”的标题",
1066
1106
  "the top bar": "顶栏",
1067
1107
  "the units of the story": "故事使用的单位",
@@ -1070,6 +1110,8 @@
1070
1110
  "The world as it was at the start, without the player characters: a .zip to give to others.": "开局时的世界,不含玩家角色:一个可分享给他人的 .zip 文件。",
1071
1111
  "the world waits for you: the story picks up at the moment you left it": "世界会等你:故事从你离开的那一刻继续",
1072
1112
  "Theme": "主题",
1113
+ "Theme's own style": "主题自带样式",
1114
+ "Themes": "主题",
1073
1115
  "There is already a game system called {system} on this computer: {name} would take its name.": "这台电脑上已有名为 {system} 的游戏系统,{name} 会占用它的名称。",
1074
1116
  "There is no {name} on this computer: give its full path.": "这台电脑上没有 {name},请输入完整路径。",
1075
1117
  "There is no player character yet: the map starts with one.": "还没有角色:有了角色,地图才会开始。",
@@ -1078,12 +1120,15 @@
1078
1120
  "These pages of the game system changed for this campaign.": "本战役中,游戏系统的这些页面有所改动。",
1079
1121
  "These words answer the master instead of a roll or a button: {question}": "这些话代替掷骰或按钮回答主持人:{question}",
1080
1122
  "These words answer the master's question: {question}": "这些话回答主持人的问题:{question}",
1123
+ "they stay on this computer": "它们只保存在这台电脑上",
1081
1124
  "This campaign does not use {name}.": "这个战役没有使用 {name}。",
1082
1125
  "this campaign has": "本战役设定",
1083
1126
  "This campaign has {name} {version}, already in play: an adventure in play is not updated.": "这个战役已有 {name} {version},并且正在进行,进行中的冒险不会更新。",
1084
1127
  "This campaign plays {name}: it stays on this computer.": "这个战役玩的是 {name},它会保留在这台电脑上。",
1085
1128
  "This campaign uses {other}, with the same name as {name}: take it out first.": "这个战役正在使用与 {name} 同名的 {other},请先将它移除。",
1086
1129
  "This campaign, as an adventure": "将本战役导出为冒险",
1130
+ "This campaign's folder is a git repository: what should the engine do with it?": "本战役的文件夹是一个 git 仓库:引擎该如何处理?",
1131
+ "This campaign's folder is in a git repository that holds other folders too: what should the engine do with it? A push sends your commits on those folders as well.": "这个战役的文件夹所在的 git 仓库里还有其他文件夹:引擎该如何处理?推送时,这些文件夹上的提交也会一并发送。",
1087
1132
  "This chat does not hear it by itself: copy it, then paste it in the chat.": "聊天不会自动收到这句话:请复制后粘贴到聊天中。",
1088
1133
  "this computer does not let it be read: check who may open it.": "这台电脑不允许读取该文件:请检查打开权限。",
1089
1134
  "This computer is translating the page into {language}: until then it stays in English.": "这台电脑正在将页面翻译成{language},在此之前仍显示英文。",
@@ -1136,6 +1181,7 @@
1136
1181
  "Up to date": "已是最新",
1137
1182
  "Update": "更新",
1138
1183
  "Update {name} to {version}": "将 {name} 更新到 {version}",
1184
+ "Update it in Packages": "前往“包”更新",
1139
1185
  "Update RPG Engine first": "先更新 RPG Engine",
1140
1186
  "Updating RPG Engine…": "正在更新 RPG Engine…",
1141
1187
  "Updating…": "正在更新…",
@@ -1164,9 +1210,11 @@
1164
1210
  "what lights your way, as long as it lasts": "为你照亮前路的东西,直到用完为止",
1165
1211
  "what must never appear in the game": "游戏中绝不能出现的内容",
1166
1212
  "What runs the game: the master's tools and this page.": "驱动游戏的部分:主持人的工具和这个页面。",
1213
+ "what the engine does with git, as this campaign's folder is a git repository": "引擎如何使用 git,因为本战役的文件夹是一个 git 仓库",
1167
1214
  "What the master asks": "主持人的提问",
1168
1215
  "what the master asks you to roll": "主持人要你掷的骰子",
1169
1216
  "what the master has explained: take one off to have it explained again": "主持人已讲解的内容:取消一项即可重新讲解",
1217
+ "what the theme adds to the page's look beyond its colours, faces and pictures; the page does not check it, so it may read less well": "主题在颜色、字体和图片之外为页面添加的外观效果;页面不会对其进行检查,因此可能不太易读",
1170
1218
  "what you carry, and how it slows you": "你携带的东西,以及它让你慢多少",
1171
1219
  "What you do": "你的行动",
1172
1220
  "what you eat and drink each day": "你每天吃喝的东西",
@@ -1180,7 +1228,9 @@
1180
1228
  "Where the page shows what the extensions add, in this campaign.": "在本战役中,页面显示扩展所添加内容的位置。",
1181
1229
  "Where the party is": "队伍所在位置",
1182
1230
  "Wherever {name} is used, this goes back to what the game system gives:": "凡是用到{name}的地方,这些都会恢复为游戏系统的原有内容:",
1231
+ "whether the saves go into the repository": "存档是否放入仓库",
1183
1232
  "whether the story's time runs while you are away, from one session to the next": "从一次游戏到下一次,你不在时故事时间是否流逝",
1233
+ "whether your chats with the master go into the repository": "你与主持人的聊天记录是否放入仓库",
1184
1234
  "Which page": "哪个页面",
1185
1235
  "Who is where": "谁在哪里",
1186
1236
  "who makes the pictures": "由谁生成图片",
@@ -1215,9 +1265,11 @@
1215
1265
  "Wry": "戏谑",
1216
1266
  "You": "你",
1217
1267
  "you bring one you already have, as a sheet, a file or a description, at its level": "带上你已有的角色,可以是角色卡、文件或描述,沿用其等级",
1268
+ "You can also give a page you see a picture of your own: with its picture button, or dropped in the campaign's inbox folder for the master.": "你也可以为看到的页面设置自己的图片:点击页面的图片按钮,或者把图片放进战役的 inbox 文件夹,交给主持人。",
1218
1269
  "You can also tell the master in the chat: they hear what you choose here.": "你也可以在聊天中告诉主持人:你在这里的选择,主持人也会收到。",
1219
1270
  "You can go to another page: it goes on by itself.": "你可以前往其他页面,它会自动继续。",
1220
1271
  "You carry it": "你带着它",
1272
+ "You choose one in Settings, under Game style.": "请在“设置”的“游戏风格”中选择。",
1221
1273
  "You chose {most}: take one off to choose another.": "你已选了 {most} 项:取消一项后才能再选其他的。",
1222
1274
  "You decide": "你来定",
1223
1275
  "you find the row on your sheet, or roll from the tray, as at the table": "你可以在角色卡上找到对应的一行,或从骰盘掷骰,就像在牌桌上一样",
@@ -1241,6 +1293,7 @@
1241
1293
  "Your character has no document called “{name}”.": "你的角色没有名为“{name}”的文档。",
1242
1294
  "Your character knows its name, and nothing more yet.": "你的角色只知道它的名字,其他暂时一无所知。",
1243
1295
  "Your character knows no one and nothing yet: whom they meet and what they learn comes here, as the master writes it.": "你的角色还不认识任何人,也一无所知。随着主持人的叙述,遇到的人和得知的事都会记录在这里。",
1296
+ "Your character knows no page called {page}: reload the page.": "你的角色没有名为 {page} 的页面,请刷新页面。",
1244
1297
  "Your character knows no place on the map yet: it grows as the master writes where places are.": "你的角色还不知道地图上的任何地点:随着主持人写下各地点的位置,地图会逐渐丰富。",
1245
1298
  "Your character knows nothing called “{name}”.": "你的角色不知道任何叫“{name}”的事物。",
1246
1299
  "your character never dies": "你的角色永不死亡",
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
2
- // The story told as a book (T-227): the master's prose, a chapter for each closed scene, set as a book's pages: one chapter at a time on paper, its paragraphs
2
+ // The story told as a book (T-227): the master's prose, a chapter each time the story turns, set as a book's pages: one chapter at a time on paper, its paragraphs
3
3
  // justified and indented, a capital at its start; the chapters listed beside it, closing to the left, the last with its bookmark; downloaded as Markdown or as a
4
4
  // web page that prints as the book.
5
5
  import { render } from "preact";
@@ -35,7 +35,7 @@ export function Book({ chapters, asked, campaign }) {
35
35
  }
36
36
  }, [asked]);
37
37
  if (chapters.length === 0) {
38
- return (_jsxs("div", { class: "book-empty", children: [_jsx("p", { children: t("Here the master writes the story as a book: a chapter for each scene, once it ends.") }), _jsx("p", { children: t("In a campaign begun before, ask the master to write the story so far.") })] }));
38
+ return (_jsxs("div", { class: "book-empty", children: [_jsx("p", { children: t("Here the master writes the story as a book: a chapter each time the story turns.") }), _jsx("p", { children: t("In a campaign begun before, ask the master to write the story so far.") })] }));
39
39
  }
40
40
  const last = chapters[chapters.length - 1];
41
41
  const current = chapters.find((chapter) => String(chapter.number) === asked) ?? last;
@@ -87,6 +87,7 @@ h2 { text-align: center; font-weight: normal; font-size: 1.6rem; margin: .3rem 0
87
87
  .book-text p { margin: 0; text-indent: 1.5em; text-align: justify; hyphens: auto; text-wrap: pretty; orphans: 2; widows: 2; }
88
88
  .book-text p:first-child, .book-text .book-break + p { text-indent: 0; }
89
89
  .book-text p:first-child:not(:lang(ar), :lang(hi), :lang(ja), :lang(zh), :lang(ko))::first-letter { float: inline-start; font-size: 3.2em; line-height: .85; padding-block-start: .05em; padding-inline-end: .08em; }
90
+ @supports (initial-letter: 3) { .book-text p:first-child:not(:lang(ar), :lang(hi), :lang(ja), :lang(zh), :lang(ko))::first-letter { float: none; margin-inline-end: .22em; padding: 0; font-size: 1em; line-height: inherit; initial-letter: 3; } }
90
91
  .book-text .book-break { text-align: center; text-indent: 0; margin: .8rem 0; }
91
92
  @media (max-width: 30rem) { body { padding: 2rem 1.25rem; } .book-text p { text-align: start; } }
92
93
  @media print { body { background: none; padding: 0; } .chapter { break-before: page; } h1 + .chapter { break-before: auto; } }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
2
2
  // The Journal section (D-367, D-369, D-371, D-384, D-388, T-227): the quests the character knows as a video game's quest log, each with the time left before its deadline at its top, its
3
3
  // goals, its counters as bars and its clock with its name, the main ones first and in gold; the ones the player follows, the main one until they choose, shown
4
- // small beside the page, or in Scene and Combat on a narrow screen; the story told as a book; its timeline by scenes, as chapters, the last first, each with what the diary tells of it; the companions'
4
+ // small beside the page, or in Scene and Combat on a narrow screen; the story told as a book; its timeline by scenes, numbered, the last first, each with what the diary tells of it; the companions'
5
5
  // diaries (D-497); and the player's own notes.
6
6
  import { useEffect, useRef, useState } from "preact/hooks";
7
7
  import { sectionAddress } from "../address.js";
@@ -14,6 +14,7 @@ import { fieldLabel, phraseLabel, sceneTypeLabel } from "../parts/labels.js";
14
14
  import { endedQuests, followedQuests, keptFollowed } from "../parts/layout.js";
15
15
  import { placeKinds } from "../parts/map-symbols.js";
16
16
  import { knowersOf, Markdown } from "../parts/markdown.js";
17
+ import { PictureButton } from "../parts/picture.js";
17
18
  import { PageHead } from "../shell/pages.js";
18
19
  import { useChoice, useKeptText } from "../shell/prefs.js";
19
20
  import { PageTabs } from "../shell/tabs.js";
@@ -164,7 +165,7 @@ function QuestCard({ quest, followed, onFollow }) {
164
165
  quest.place === undefined ? undefined : t("at {place}", { place: quest.place }),
165
166
  quest.deadline === undefined ? undefined : byDateLabel(quest.deadline.date),
166
167
  ].filter((part) => part !== undefined);
167
- return (_jsxs("article", { class: ["quest-card", quest.main ? "main" : "", quest.status].filter((name) => name !== "").join(" "), "aria-labelledby": id, children: [_jsxs("header", { class: "quest-cover", children: [_jsx(QuestFace, { quest: quest }), _jsxs("div", { class: "quest-cover-top", children: [open && (_jsx("button", { type: "button", class: followed ? "followed-star on" : "followed-star", "aria-pressed": followed, "aria-label": t("Follow {quest}", { quest: quest.name }), "data-tip": t("Follow {quest}", { quest: quest.name }), onClick: () => onFollow(quest.name, !followed), children: _jsx(Star, {}) })), open && quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline }), quest.main && _jsx("span", { class: "quest-badge", children: t("Main") })] }), _jsx("h4", { class: "quest-name", id: id, title: quest.name, children: quest.name })] }), from.length > 0 && _jsx("p", { class: "quest-from", children: from.join(" · ") }), quest.text !== "" && (_jsx("div", { class: "quest-text", children: _jsx(Markdown, { text: quest.text, secretKnowers: knowersOf(quest.knownBy) }) })), quest.goals.length > 0 && _jsx(Goals, { quest: quest }), (quest.counters.length > 0 || quest.clock !== undefined) && (_jsxs("div", { class: "quest-measures", children: [quest.counters.map((counter) => _jsx(QuestBar, { counter: counter }, counter.field)), quest.clock !== undefined && (_jsxs("span", { class: "quest-clock", children: [_jsx(ClockFace, { clock: quest.clock, hidden: true }), _jsxs("span", { children: [quest.clock.name ?? t("Clock"), " ", quest.clock.value, "/", quest.clock.max] })] }))] }))] }));
168
+ return (_jsxs("article", { class: ["quest-card", quest.main ? "main" : "", quest.status].filter((name) => name !== "").join(" "), "aria-labelledby": id, children: [_jsxs("header", { class: "quest-cover picture-host", children: [_jsx(QuestFace, { quest: quest }), _jsxs("div", { class: "quest-cover-top", children: [open && (_jsx("button", { type: "button", class: followed ? "followed-star on" : "followed-star", "aria-pressed": followed, "aria-label": t("Follow {quest}", { quest: quest.name }), "data-tip": t("Follow {quest}", { quest: quest.name }), onClick: () => onFollow(quest.name, !followed), children: _jsx(Star, {}) })), open && quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline }), quest.main && _jsx("span", { class: "quest-badge", children: t("Main") })] }), _jsx("h4", { class: "quest-name", id: id, title: quest.name, children: quest.name }), _jsx(PictureButton, { page: quest.name, has: quest.picture !== undefined, icon: true })] }), from.length > 0 && _jsx("p", { class: "quest-from", children: from.join(" · ") }), quest.text !== "" && (_jsx("div", { class: "quest-text", children: _jsx(Markdown, { text: quest.text, secretKnowers: knowersOf(quest.knownBy) }) })), quest.goals.length > 0 && _jsx(Goals, { quest: quest }), (quest.counters.length > 0 || quest.clock !== undefined) && (_jsxs("div", { class: "quest-measures", children: [quest.counters.map((counter) => _jsx(QuestBar, { counter: counter }, counter.field)), quest.clock !== undefined && (_jsxs("span", { class: "quest-clock", children: [_jsx(ClockFace, { clock: quest.clock, hidden: true }), _jsxs("span", { children: [quest.clock.name ?? t("Clock"), " ", quest.clock.value, "/", quest.clock.max] })] }))] }))] }));
168
169
  }
169
170
  // The mark of a quest whose place has no kind the map draws: a flag.
170
171
  const questFlag = "M6 21V3.5 M6 4.5h11l-2.6 4 2.6 4H6";
@@ -208,7 +209,9 @@ export function Deadline({ deadline }) {
208
209
  const text = minutes === undefined ? byDateLabel(deadline.date) : minutes <= 0 ? t("Time is up") : durationText(minutes);
209
210
  // Its word apart, which the followed quest's strip leaves to a screen reader on a phone.
210
211
  const left = minutes !== undefined && minutes > 0;
211
- return (_jsxs("span", { class: near ? "quest-deadline near" : "quest-deadline", "data-tip": phraseLabel(byDateLabel(deadline.date)), children: [_jsx(Icon, { name: "hourglass" }), _jsxs("span", { children: [text, left && _jsx("span", { class: "quest-deadline-left", children: ` ${t("left")}` })] })] }));
212
+ const by = phraseLabel(byDateLabel(deadline.date));
213
+ // Its date in its tip, and for a screen reader before the time left, as the tip is for the eye (T-228).
214
+ return (_jsxs("span", { class: near ? "quest-deadline near" : "quest-deadline", "data-tip": by, children: [minutes !== undefined && _jsx("span", { class: "visually-hidden", children: by }), _jsx(Icon, { name: "hourglass" }), _jsxs("span", { children: [text, left && _jsx("span", { class: "quest-deadline-left", children: ` ${t("left")}` })] })] }));
212
215
  }
213
216
  /** The story by its scenes, the last first: each with its place and date, its summary, and what the diary tells of it, folded. */
214
217
  function Timeline({ chapters, now }) {
@@ -217,7 +220,7 @@ function Timeline({ chapters, now }) {
217
220
  }
218
221
  return (_jsxs("ol", { class: "story", children: [_jsxs("li", { class: "eyebrow story-mark now", children: [_jsx("b", { children: t("Now") }), now !== undefined && _jsx("span", { children: phraseLabel(gameDateLabel(now)) })] }), chapters.map((chapter, index) => chapter.title === undefined
219
222
  ? _jsx(Between, { chapter: chapter }, chapterKey(chapters, index))
220
- : (_jsxs("li", { class: ["chapter", chapter.open ? "now" : "", chapter.picture === undefined && placeKinds[chapter.kind ?? ""] === undefined ? "bare" : ""].join(" ").trim(), "data-number": chapter.number, tabIndex: -1, children: [_jsx(ChapterPicture, { chapter: chapter }), _jsxs("div", { class: "chapter-body", children: [_jsxs("header", { class: "chapter-head", children: [chapter.number !== undefined && _jsx("span", { class: "eyebrow chapter-number", children: t("Chapter {number}", { number: chapter.number }) }), _jsx("h3", { children: chapter.title }), chapter.open && _jsx("span", { class: "chapter-now", children: t("Now") }), chapter.type !== undefined && _jsx("span", { class: "chapter-type", children: phraseLabel(sceneTypeLabel(chapter.type)) })] }), (chapter.place !== undefined || chapter.date !== undefined) && (_jsx("p", { class: "chapter-when", children: [chapter.place, chapter.date === undefined ? undefined : phraseLabel(gameDateLabel(chapter.date))].filter((part) => part !== undefined).join(" · ") })), chapter.summary !== undefined && _jsx("p", { class: "chapter-summary", children: chapter.summary }), chapter.facts.length > 0 && (_jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: chapter.facts.length === 1 ? t("1 thing that happened") : t("{count} things that happened", { count: chapter.facts.length }) }), _jsx(Facts, { facts: chapter.facts })] }))] })] }, chapterKey(chapters, index)))), _jsx("li", { class: "eyebrow story-mark start", children: _jsx("b", { children: t("The start") }) })] }));
223
+ : (_jsxs("li", { class: ["chapter", chapter.open ? "now" : "", chapter.picture === undefined && placeKinds[chapter.kind ?? ""] === undefined ? "bare" : ""].join(" ").trim(), "data-number": chapter.number, tabIndex: -1, children: [_jsx(ChapterPicture, { chapter: chapter }), _jsxs("div", { class: "chapter-body", children: [_jsxs("header", { class: "chapter-head", children: [chapter.number !== undefined && _jsx("span", { class: "eyebrow chapter-number", children: t("Scene {number}", { number: chapter.number }) }), _jsx("h3", { children: chapter.title }), chapter.open && _jsx("span", { class: "chapter-now", children: t("Now") }), chapter.type !== undefined && _jsx("span", { class: "chapter-type", children: phraseLabel(sceneTypeLabel(chapter.type)) })] }), (chapter.place !== undefined || chapter.date !== undefined) && (_jsx("p", { class: "chapter-when", children: [chapter.place, chapter.date === undefined ? undefined : phraseLabel(gameDateLabel(chapter.date))].filter((part) => part !== undefined).join(" · ") })), chapter.summary !== undefined && _jsx("p", { class: "chapter-summary", children: chapter.summary }), chapter.facts.length > 0 && (_jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: chapter.facts.length === 1 ? t("1 thing that happened") : t("{count} things that happened", { count: chapter.facts.length }) }), _jsx(Facts, { facts: chapter.facts })] }))] })] }, chapterKey(chapters, index)))), _jsx("li", { class: "eyebrow story-mark start", children: _jsx("b", { children: t("The start") }) })] }));
221
224
  }
222
225
  /** The companions' diaries, the last line first, all of them or one companion's (D-497): each line with who wrote it and when, in their own words. */
223
226
  function Diaries({ thoughts }) {
@@ -246,7 +249,7 @@ function Diaries({ thoughts }) {
246
249
  function ChapterPicture({ chapter }) {
247
250
  const kind = placeKinds[chapter.kind ?? ""];
248
251
  if (chapter.picture !== undefined) {
249
- return (_jsx("div", { class: "chapter-picture", "aria-hidden": "true", children: _jsx("img", { src: pictureAddress(chapter.picture), alt: "", loading: "lazy" }) }));
252
+ return (_jsxs("div", { class: "chapter-picture picture-host", children: [_jsx("img", { src: pictureAddress(chapter.picture), alt: "", loading: "lazy", "aria-hidden": "true" }), chapter.place !== undefined && _jsx(PictureButton, { page: chapter.place, has: true, icon: true })] }));
250
253
  }
251
254
  return kind === undefined ? null : (_jsx("div", { class: "chapter-picture kind", "aria-hidden": "true", children: _jsx("svg", { viewBox: "0 0 24 24", children: _jsx("path", { d: kind.glyph }) }) }));
252
255
  }
@@ -10,7 +10,7 @@ export { Text, Track, Value, Who } from "./packages/widgets.js";
10
10
  export { statusIcons } from "./parts/icons.js";
11
11
  /** A button of words, as the page's: gold for the one main action, quiet for a secondary one, danger for one that loses something. */
12
12
  export function Button({ children, onClick, kind, disabled, tip }) {
13
- return (_jsx("button", { type: "button", class: kind === undefined ? "button" : `button ${kind}`, "aria-disabled": disabled === true ? "true" : undefined, "data-tip": tip, onClick: () => disabled !== true && onClick(), children: children }));
13
+ return (_jsx("button", { type: "button", class: kind === undefined ? "button" : `button ${kind}`, "aria-disabled": disabled === true ? "true" : undefined, "aria-description": tip, "data-tip": tip, onClick: () => disabled !== true && onClick(), children: children }));
14
14
  }
15
15
  /** A button of an icon, named by its words, which its tooltip shows. */
16
16
  export function IconButton({ path, label, onClick }) {
@@ -45,7 +45,7 @@ export function AddField({ state, onAdd, onFile }) {
45
45
  if (file !== undefined) {
46
46
  onFile(file);
47
47
  }
48
- } })] }), _jsx("p", { class: "package-note", id: "package-source-about", children: t("It tells the kind by itself: a game system, an adventure, an extension or a language. A file is a .zip or a .tgz.") }), empty && state.work === undefined && _jsx("p", { class: "package-said problem", role: "status", children: t("Write a link, an npm name or a folder first.") }), _jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said, onSee: state.onSee })] }));
48
+ } })] }), _jsx("p", { class: "package-note", id: "package-source-about", children: t("It tells the kind by itself: a game system, an adventure, an extension, a theme or a language. A file is a .zip or a .tgz.") }), empty && state.work === undefined && _jsx("p", { class: "package-said problem", role: "status", children: t("Write a link, an npm name or a folder first.") }), _jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said, onSee: state.onSee })] }));
49
49
  }
50
50
  /**
51
51
  * The catalog (D-486), always open: a search, chips for the kinds with how many each has, wrapping on a phone; the first rows, five or three on a phone, then
@@ -96,19 +96,35 @@ export function newerOf(name, kind, catalog) {
96
96
  export function entryOf(name, kind, catalog) {
97
97
  return catalog?.entries.find((one) => one.kind === kind && samePackage(one, name));
98
98
  }
99
- /** How many packages here npm has a newer version of: the count on the Installed tab. */
99
+ /** A theme here as the catalog has it, from GitHub: the repository it was installed from, which the engine marks installed, by its name. */
100
+ export function themeEntryOf(theme, catalog) {
101
+ return catalog?.entries.find((one) => one.kind === "theme" && one.installed !== undefined && foldedText(one.title) === foldedText(theme.name));
102
+ }
103
+ /** A language here as the catalog has it: npm's by its package, one of data alone by its code, from the GitHub repository it was installed from. */
104
+ export function languageEntryOf(language, catalog) {
105
+ return language.unpacked === true
106
+ ? catalog?.entries.find((one) => one.kind === "language" && one.installed !== undefined && one.language?.toLowerCase() === language.code.toLowerCase())
107
+ : entryOf(language.package, "language", catalog);
108
+ }
109
+ /** The newer version the catalog has of an entry here; undefined when it has none. */
110
+ export function newerVersion(entry) {
111
+ return entry?.update === true ? entry.version : undefined;
112
+ }
113
+ /** How many packages here npm or GitHub has a newer version of: the count on the Installed tab. */
100
114
  export function updateCount(view, catalog) {
101
115
  const systems = (view.systems ?? []).filter((one) => one.package !== undefined && newerOf(one.package, "system", catalog) !== undefined);
102
116
  const extensions = view.installed.filter((one) => newerOf(one.package, "extension", catalog) !== undefined);
103
- const languages = (view.languages ?? []).filter((one) => newerOf(one.package, "language", catalog) !== undefined);
104
- return systems.length + extensions.length + languages.length;
117
+ const languages = (view.languages ?? []).filter((one) => newerVersion(languageEntryOf(one, catalog)) !== undefined);
118
+ const themes = (view.themes ?? []).filter((one) => newerVersion(themeEntryOf(one, catalog)) !== undefined);
119
+ return systems.length + extensions.length + languages.length + themes.length;
105
120
  }
106
121
  /** A catalog's title: an adventure's as its author wrote it; an npm package's name with its first letter a capital, as the rows of what is here. */
107
122
  export function entryTitle(entry) {
108
- // A language by its code, as lang-de: named in the page's language.
109
- const code = entry.kind === "language" ? /^(?:lang-)?([a-z]{2,3}(?:-[a-z0-9]+)?)$/i.exec(entry.title)?.[1] : undefined;
123
+ // A language by its code, GitHub's as its language.yaml gives it, npm's by its name, as lang-de: named in the page's language.
124
+ const code = entry.kind === "language" ? entry.language ?? /^(?:lang-)?([a-z]{2,3}(?:-[a-z0-9]+)?)$/i.exec(entry.title)?.[1] : undefined;
110
125
  const language = code === undefined ? undefined : languageName(code, pageLanguage());
111
- return entry.kind === "adventure" ? entry.title : phraseLabel(language ?? entry.title);
126
+ // An adventure's and a theme's titles are their authors'.
127
+ return entry.kind === "adventure" || entry.kind === "theme" ? entry.title : phraseLabel(language ?? entry.title);
112
128
  }
113
129
  /** npm or GitHub away, or both: the rest is added all the same; the engine's words under the page's, and Try again. */
114
130
  function CatalogAway({ failed, asking, onRetry }) {
@@ -117,7 +133,7 @@ function CatalogAway({ failed, asking, onRetry }) {
117
133
  ? [t("The catalog does not answer."), t("A file, a link or a folder can be added all the same.")]
118
134
  : failed.npm !== undefined
119
135
  ? [t("npm does not answer."), t("Game systems, extensions and languages come from npm: a file, a link or a folder can be added all the same.")]
120
- : [t("GitHub does not answer."), t("The catalog's adventures come from GitHub: a .zip or a link can be added all the same.")];
136
+ : [t("GitHub does not answer."), t("The catalog's adventures and themes come from GitHub: a .zip or a link can be added all the same.")];
121
137
  const why = [...new Set([failed.npm, failed.github].filter((one) => one !== undefined))];
122
138
  return (_jsxs("div", { class: "package-offline", role: "status", children: [_jsx(Icon, { name: "offline" }), _jsxs("div", { children: [_jsxs("p", { children: [_jsx("strong", { children: headline }), " ", line] }), why.map((one) => (_jsx("p", { class: "package-why", children: _jsx("bdi", { children: one }) }, one))), _jsxs("button", { type: "button", class: "button package-button", "aria-disabled": asking, onClick: () => !asking && onRetry(), children: [_jsx(Icon, { name: "update" }), t("Try again")] })] })] }));
123
139
  }
@@ -134,12 +150,13 @@ function CatalogRow({ entry, named, view, state, needs, onAdd, onUpdate }) {
134
150
  entry.author !== undefined && !entry.verified && !entry.code ? t("by {author}", { author: entry.author }) : "",
135
151
  entry.levels === undefined ? "" : levelsText(entry.levels),
136
152
  entry.length ?? "",
137
- entry.language === undefined ? "" : languageName(entry.language, pageLanguage()) ?? entry.language,
153
+ // An adventure's language; a language's own is its title.
154
+ entry.language === undefined || entry.kind === "language" ? "" : languageName(entry.language, pageLanguage()) ?? entry.language,
138
155
  entry.stars === undefined || entry.stars === 0 ? "" : `★ ${entry.stars}`,
139
156
  asksYes ? t("has code: asks your yes") : "",
140
157
  entry.kind === "system" && here === "none" && view.system !== null ? t("for a new campaign: this one stays in {system}", { system: systemNameLabel(view.system.name) }) : "",
141
158
  ].filter((fact) => fact !== "");
142
- const version = entry.update && entry.installed !== undefined && entry.version !== undefined
159
+ const version = entry.update && entry.installed !== undefined && entry.installed !== "" && entry.version !== undefined
143
160
  ? (_jsxs("span", { class: "package-update", children: [_jsx(Icon, { name: "update" }), `${isolated(entry.installed)} ${pageDirection() === "rtl" ? "←" : "→"} ${isolated(entry.version)}`] }))
144
161
  : entry.version;
145
162
  const action = (word, label, icon, onClick, accent = false) => (_jsxs("button", { type: "button", class: accent ? "button package-button accent" : "button package-button", "aria-label": label, "aria-disabled": state.busy, onClick: () => !state.busy && onClick(), children: [_jsx(Icon, { name: icon }), word] }));
@@ -154,16 +171,16 @@ function CatalogRow({ entry, named, view, state, needs, onAdd, onUpdate }) {
154
171
  : action(asksYes ? t("Add…") : t("Add"), t("Add {name}", { name: entryTitle(entry) }), "plus", onAdd), children: [_jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said, onSee: state.onSee })] }));
155
172
  }
156
173
  // The kinds in the order of the chips, each with its tile.
157
- const kindOrder = ["system", "adventure", "extension", "language"];
158
- const kindIcon = { system: "dice", adventure: "world", extension: "packages", language: "language" };
174
+ const kindOrder = ["system", "adventure", "extension", "theme", "language"];
175
+ const kindIcon = { system: "dice", adventure: "world", extension: "packages", theme: "theme", language: "language" };
159
176
  /** A kind, for one package. */
160
177
  function kindLabel(kind) {
161
- const labels = { system: t("System"), adventure: t("Adventure"), extension: t("Extension"), language: t("Language") };
178
+ const labels = { system: t("System"), adventure: t("Adventure"), extension: t("Extension"), theme: t("Theme"), language: t("Language") };
162
179
  return labels[kind];
163
180
  }
164
181
  /** A kind, for its chip. */
165
182
  function kindsLabel(kind) {
166
- const labels = { system: t("Systems"), adventure: t("Adventures"), extension: t("Extensions"), language: t("Languages") };
183
+ const labels = { system: t("Systems"), adventure: t("Adventures"), extension: t("Extensions"), theme: t("Themes"), language: t("Languages") };
167
184
  return labels[kind];
168
185
  }
169
186
  /** Whether an entry matches what the player searched: by its title, what it is or who wrote it, case and accents aside. */