rpg-engine 0.15.0 → 0.17.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 (503) hide show
  1. package/dist/adventures/source.d.ts +3 -1
  2. package/dist/adventures/source.js +31 -1
  3. package/dist/campaign/find-campaign.js +8 -4
  4. package/dist/campaign/index.d.ts +1 -1
  5. package/dist/campaign/index.js +1 -1
  6. package/dist/campaign/settings.d.ts +6 -0
  7. package/dist/campaign/settings.js +22 -1
  8. package/dist/cli/cli.js +1 -1
  9. package/dist/cli/command-line.js +1 -1
  10. package/dist/commands/advance.d.ts +1 -1
  11. package/dist/commands/advance.js +6 -6
  12. package/dist/commands/ask.js +7 -7
  13. package/dist/commands/change/amounts.d.ts +32 -0
  14. package/dist/commands/change/amounts.js +150 -0
  15. package/dist/commands/change/change.d.ts +4 -54
  16. package/dist/commands/change/change.js +19 -749
  17. package/dist/commands/change/damage.d.ts +30 -0
  18. package/dist/commands/change/damage.js +73 -2
  19. package/dist/commands/change/dice.d.ts +34 -0
  20. package/dist/commands/change/dice.js +59 -0
  21. package/dist/commands/change/fields.d.ts +37 -0
  22. package/dist/commands/change/fields.js +156 -0
  23. package/dist/commands/change/holder.d.ts +48 -0
  24. package/dist/commands/change/holder.js +162 -0
  25. package/dist/commands/change/recipe-pace.js +1 -1
  26. package/dist/commands/change/recipe.d.ts +58 -0
  27. package/dist/commands/change/recipe.js +179 -0
  28. package/dist/commands/choices.js +3 -3
  29. package/dist/commands/config/config.d.ts +15 -0
  30. package/dist/commands/config/config.js +355 -0
  31. package/dist/commands/config/custom-levels.d.ts +7 -0
  32. package/dist/commands/config/custom-levels.js +32 -0
  33. package/dist/commands/{config.d.ts → config/dashboard.d.ts} +2 -24
  34. package/dist/commands/config/dashboard.js +171 -0
  35. package/dist/commands/config/entries.d.ts +17 -0
  36. package/dist/commands/config/entries.js +76 -0
  37. package/dist/commands/config/news.d.ts +7 -0
  38. package/dist/commands/config/news.js +88 -0
  39. package/dist/commands/config/shown.d.ts +9 -0
  40. package/dist/commands/config/shown.js +80 -0
  41. package/dist/commands/config/words.d.ts +27 -0
  42. package/dist/commands/config/words.js +204 -0
  43. package/dist/commands/effect.js +9 -9
  44. package/dist/commands/find.js +1 -1
  45. package/dist/commands/image.js +6 -6
  46. package/dist/commands/import/import.d.ts +0 -2
  47. package/dist/commands/import/import.js +68 -45
  48. package/dist/commands/import/run.js +1 -1
  49. package/dist/commands/index.js +3 -3
  50. package/dist/commands/init.js +2 -2
  51. package/dist/commands/install.js +1 -1
  52. package/dist/commands/instructions.js +6 -6
  53. package/dist/commands/mode.d.ts +2 -2
  54. package/dist/commands/mode.js +8 -8
  55. package/dist/commands/mood.js +4 -4
  56. package/dist/commands/move.js +10 -10
  57. package/dist/commands/package/consent.d.ts +11 -0
  58. package/dist/commands/package/consent.js +52 -0
  59. package/dist/commands/package/here.d.ts +51 -0
  60. package/dist/commands/package/here.js +128 -0
  61. package/dist/commands/package/install.d.ts +10 -0
  62. package/dist/commands/package/install.js +337 -0
  63. package/dist/commands/package/package.d.ts +18 -0
  64. package/dist/commands/package/package.js +270 -0
  65. package/dist/commands/package/result.d.ts +89 -0
  66. package/dist/commands/package/result.js +1 -0
  67. package/dist/commands/package/uninstall.d.ts +6 -0
  68. package/dist/commands/package/uninstall.js +70 -0
  69. package/dist/commands/rename.js +3 -3
  70. package/dist/commands/reveal.js +5 -5
  71. package/dist/commands/roll/roll.js +11 -9
  72. package/dist/commands/roll/tables.js +1 -1
  73. package/dist/commands/rules.d.ts +2 -2
  74. package/dist/commands/rules.js +3 -3
  75. package/dist/commands/save.d.ts +2 -2
  76. package/dist/commands/save.js +2 -2
  77. package/dist/commands/scene/close.d.ts +18 -0
  78. package/dist/commands/scene/close.js +179 -0
  79. package/dist/commands/scene/members.d.ts +14 -0
  80. package/dist/commands/scene/members.js +32 -0
  81. package/dist/commands/scene/open.d.ts +6 -0
  82. package/dist/commands/scene/open.js +298 -0
  83. package/dist/commands/scene/result.d.ts +98 -0
  84. package/dist/commands/scene/result.js +2 -0
  85. package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
  86. package/dist/commands/scene/scene.js +210 -0
  87. package/dist/commands/scene/turns.d.ts +18 -0
  88. package/dist/commands/scene/turns.js +229 -0
  89. package/dist/commands/shared/books/adventure-layers.d.ts +89 -0
  90. package/dist/commands/shared/books/adventure-layers.js +201 -0
  91. package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +28 -9
  92. package/dist/commands/shared/{adventures.js → books/adventures.js} +77 -35
  93. package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
  94. package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
  95. package/dist/commands/shared/{library.js → books/library.js} +9 -9
  96. package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
  97. package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
  98. package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
  99. package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
  100. package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
  101. package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
  102. package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
  103. package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
  104. package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
  105. package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
  106. package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
  107. package/dist/commands/shared/{mode.js → campaign/mode.js} +24 -13
  108. package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
  109. package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
  110. package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
  111. package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
  112. package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
  113. package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
  114. package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +3 -3
  115. package/dist/commands/shared/{parts.js → campaign/parts.js} +3 -3
  116. package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
  117. package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
  118. package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
  119. package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
  120. package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
  121. package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
  122. package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
  123. package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
  124. package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
  125. package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
  126. package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
  127. package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
  128. package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
  129. package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
  130. package/dist/commands/shared/characters/orders.d.ts +4 -0
  131. package/dist/commands/shared/characters/orders.js +10 -0
  132. package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +9 -6
  133. package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +17 -7
  134. package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
  135. package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
  136. package/dist/commands/shared/examples.js +2 -2
  137. package/dist/commands/shared/packages/catalog.js +2 -2
  138. package/dist/commands/shared/packages/code.d.ts +1 -1
  139. package/dist/commands/shared/packages/code.js +8 -8
  140. package/dist/commands/shared/packages/extensions.d.ts +1 -1
  141. package/dist/commands/shared/packages/extensions.js +1 -1
  142. package/dist/commands/shared/packages/hooks.d.ts +1 -1
  143. package/dist/commands/shared/packages/hooks.js +1 -1
  144. package/dist/commands/shared/packages/widgets.d.ts +3 -3
  145. package/dist/commands/shared/packages/widgets.js +3 -3
  146. package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
  147. package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
  148. package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
  149. package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
  150. package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
  151. package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
  152. package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
  153. package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
  154. package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
  155. package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
  156. package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
  157. package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
  158. package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
  159. package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
  160. package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
  161. package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
  162. package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
  163. package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
  164. package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
  165. package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
  166. package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
  167. package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
  168. package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
  169. package/dist/commands/shared/{scene.js → scene/scene.js} +10 -8
  170. package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
  171. package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
  172. package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
  173. package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
  174. package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
  175. package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
  176. package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
  177. package/dist/commands/shared/sheet/effect-values.js +69 -0
  178. package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
  179. package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
  180. package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
  181. package/dist/commands/shared/sheet/formula-problems.js +140 -0
  182. package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
  183. package/dist/commands/shared/sheet/formula-scope.js +235 -0
  184. package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
  185. package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
  186. package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
  187. package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
  188. package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +7 -5
  189. package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
  190. package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
  191. package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
  192. package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
  193. package/dist/commands/shared/sheet/system-fields.js +45 -0
  194. package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
  195. package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
  196. package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
  197. package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
  198. package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
  199. package/dist/commands/shared/sheet/worked-out.js +291 -0
  200. package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
  201. package/dist/commands/shared/sheet/worked-text.js +55 -0
  202. package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
  203. package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
  204. package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
  205. package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
  206. package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
  207. package/dist/commands/shared/{events.js → time/events.js} +10 -13
  208. package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
  209. package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
  210. package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
  211. package/dist/commands/shared/{time.js → time/time.js} +6 -6
  212. package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
  213. package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
  214. package/dist/commands/show.d.ts +9 -0
  215. package/dist/commands/show.js +43 -10
  216. package/dist/commands/status.d.ts +2 -1
  217. package/dist/commands/status.js +28 -22
  218. package/dist/commands/thoughts.d.ts +1 -0
  219. package/dist/commands/thoughts.js +26 -18
  220. package/dist/commands/trade.js +8 -8
  221. package/dist/commands/translate.d.ts +1 -1
  222. package/dist/commands/translate.js +3 -3
  223. package/dist/commands/travel/open.d.ts +1 -1
  224. package/dist/commands/travel/open.js +2 -2
  225. package/dist/commands/travel/route.js +7 -6
  226. package/dist/commands/travel/travel.d.ts +1 -1
  227. package/dist/commands/travel/travel.js +8 -8
  228. package/dist/commands/validate.js +3 -3
  229. package/dist/commands/view/journal.d.ts +2 -2
  230. package/dist/commands/view/journal.js +2 -2
  231. package/dist/commands/view/layers.d.ts +34 -0
  232. package/dist/commands/view/layers.js +44 -0
  233. package/dist/commands/view/map.d.ts +1 -1
  234. package/dist/commands/view/map.js +6 -6
  235. package/dist/commands/view/memory.d.ts +16 -0
  236. package/dist/commands/view/memory.js +96 -0
  237. package/dist/commands/view/page.d.ts +32 -0
  238. package/dist/commands/view/page.js +166 -0
  239. package/dist/commands/view/place.d.ts +7 -2
  240. package/dist/commands/view/place.js +30 -12
  241. package/dist/commands/view/result.d.ts +252 -0
  242. package/dist/commands/view/result.js +1 -0
  243. package/dist/commands/view/saves.d.ts +6 -0
  244. package/dist/commands/view/saves.js +53 -0
  245. package/dist/commands/view/story.d.ts +32 -0
  246. package/dist/commands/view/story.js +227 -0
  247. package/dist/commands/view/view.d.ts +29 -292
  248. package/dist/commands/view/view.js +31 -536
  249. package/dist/commands/view/world.d.ts +1 -1
  250. package/dist/commands/view/world.js +3 -3
  251. package/dist/commands/write/checks.d.ts +42 -0
  252. package/dist/commands/write/checks.js +291 -0
  253. package/dist/commands/write/here.d.ts +1 -1
  254. package/dist/commands/write/here.js +5 -5
  255. package/dist/commands/write/inheritance.d.ts +40 -0
  256. package/dist/commands/write/inheritance.js +185 -0
  257. package/dist/commands/write/input.d.ts +29 -0
  258. package/dist/commands/write/input.js +124 -0
  259. package/dist/commands/write/layer.d.ts +44 -0
  260. package/dist/commands/write/layer.js +68 -0
  261. package/dist/commands/write/notes.d.ts +22 -0
  262. package/dist/commands/write/notes.js +76 -0
  263. package/dist/commands/write/progression.d.ts +27 -0
  264. package/dist/commands/write/progression.js +175 -0
  265. package/dist/commands/write/write.d.ts +2 -0
  266. package/dist/commands/write/write.js +36 -816
  267. package/dist/core/files.d.ts +2 -0
  268. package/dist/core/files.js +7 -0
  269. package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
  270. package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
  271. package/dist/core/session-store.js +3 -3
  272. package/dist/core/store.d.ts +2 -2
  273. package/dist/core/store.js +18 -4
  274. package/dist/core/text.d.ts +2 -0
  275. package/dist/core/text.js +4 -0
  276. package/dist/dashboard/acts/acts.js +1 -1
  277. package/dist/dashboard/acts/sending.js +110 -0
  278. package/dist/dashboard/acts/sheet.js +2 -2
  279. package/dist/dashboard/acts/strip.js +1 -1
  280. package/dist/dashboard/address.js +6 -0
  281. package/dist/dashboard/api.js +19 -1
  282. package/dist/dashboard/app.js +51 -171
  283. package/dist/dashboard/dice/roller.js +1 -1
  284. package/dist/dashboard/dice/sets.js +2 -2
  285. package/dist/dashboard/dice/stage.js +1 -1
  286. package/dist/dashboard/dice/tray.js +6 -6
  287. package/dist/dashboard/guide/ar.md +7 -3
  288. package/dist/dashboard/guide/cs.md +9 -5
  289. package/dist/dashboard/guide/da.md +9 -5
  290. package/dist/dashboard/guide/de.md +7 -3
  291. package/dist/dashboard/guide/el.md +9 -5
  292. package/dist/dashboard/guide/en.md +4 -0
  293. package/dist/dashboard/guide/es.md +8 -4
  294. package/dist/dashboard/guide/fi.md +9 -5
  295. package/dist/dashboard/guide/fr.md +8 -4
  296. package/dist/dashboard/guide/he.md +7 -3
  297. package/dist/dashboard/guide/hi.md +10 -6
  298. package/dist/dashboard/guide/hu.md +8 -4
  299. package/dist/dashboard/guide/is.md +9 -5
  300. package/dist/dashboard/guide/it.md +5 -1
  301. package/dist/dashboard/guide/ja.md +9 -5
  302. package/dist/dashboard/guide/ko.md +8 -4
  303. package/dist/dashboard/guide/nb.md +8 -4
  304. package/dist/dashboard/guide/nl.md +8 -4
  305. package/dist/dashboard/guide/pl.md +8 -4
  306. package/dist/dashboard/guide/pt.md +7 -3
  307. package/dist/dashboard/guide/ro.md +9 -5
  308. package/dist/dashboard/guide/ru.md +8 -4
  309. package/dist/dashboard/guide/sv.md +9 -5
  310. package/dist/dashboard/guide/tr.md +9 -5
  311. package/dist/dashboard/guide/uk.md +8 -4
  312. package/dist/dashboard/guide/zh.md +8 -4
  313. package/dist/dashboard/help/help.js +3 -3
  314. package/dist/dashboard/i18n/ar.json +29 -0
  315. package/dist/dashboard/i18n/cs.json +29 -0
  316. package/dist/dashboard/i18n/da.json +29 -0
  317. package/dist/dashboard/i18n/de.json +29 -0
  318. package/dist/dashboard/i18n/el.json +29 -0
  319. package/dist/dashboard/i18n/es.json +29 -0
  320. package/dist/dashboard/i18n/fi.json +29 -0
  321. package/dist/dashboard/i18n/fr.json +29 -0
  322. package/dist/dashboard/i18n/he.json +29 -0
  323. package/dist/dashboard/i18n/hi.json +29 -0
  324. package/dist/dashboard/i18n/hu.json +29 -0
  325. package/dist/dashboard/i18n/is.json +29 -0
  326. package/dist/dashboard/i18n/it.json +29 -0
  327. package/dist/dashboard/i18n/ja.json +30 -1
  328. package/dist/dashboard/i18n/ko.json +29 -0
  329. package/dist/dashboard/i18n/nb.json +29 -0
  330. package/dist/dashboard/i18n/nl.json +29 -0
  331. package/dist/dashboard/i18n/pl.json +29 -0
  332. package/dist/dashboard/i18n/pt.json +29 -0
  333. package/dist/dashboard/i18n/ro.json +29 -0
  334. package/dist/dashboard/i18n/ru.json +29 -0
  335. package/dist/dashboard/i18n/sv.json +29 -0
  336. package/dist/dashboard/i18n/tr.json +29 -0
  337. package/dist/dashboard/i18n/uk.json +29 -0
  338. package/dist/dashboard/i18n/zh.json +29 -0
  339. package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
  340. package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
  341. package/dist/dashboard/kit.js +3 -3
  342. package/dist/dashboard/packages/ask-card.js +3 -3
  343. package/dist/dashboard/packages/catalog.js +196 -0
  344. package/dist/dashboard/packages/changes.js +111 -0
  345. package/dist/dashboard/packages/engine.js +87 -0
  346. package/dist/dashboard/packages/installed.js +53 -0
  347. package/dist/dashboard/packages/library.js +97 -0
  348. package/dist/dashboard/packages/outcomes.js +45 -0
  349. package/dist/dashboard/packages/packages.js +27 -578
  350. package/dist/dashboard/packages/page-code.js +15 -2
  351. package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
  352. package/dist/dashboard/packages/rows.js +84 -0
  353. package/dist/dashboard/packages/share.js +44 -0
  354. package/dist/dashboard/packages/widgets.js +3 -3
  355. package/dist/dashboard/{card.js → parts/card.js} +1 -1
  356. package/dist/dashboard/parts/changed.js +37 -0
  357. package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
  358. package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
  359. package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
  360. package/dist/dashboard/{labels.js → parts/labels.js} +2 -1
  361. package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
  362. package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
  363. package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
  364. package/dist/dashboard/{refusals.js → parts/refusals.js} +5 -1
  365. package/dist/dashboard/{status.js → parts/status.js} +4 -4
  366. package/dist/dashboard/{widgets.js → parts/widgets.js} +5 -3
  367. package/dist/dashboard/place/key.js +24 -0
  368. package/dist/dashboard/place/paper.js +67 -0
  369. package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
  370. package/dist/dashboard/place/things.js +129 -0
  371. package/dist/dashboard/place/tokens.js +93 -0
  372. package/dist/dashboard/place/view.js +124 -0
  373. package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
  374. package/dist/dashboard/{asked.js → play/asked.js} +10 -10
  375. package/dist/dashboard/{choices.js → play/choices.js} +11 -10
  376. package/dist/dashboard/{requested.js → play/requested.js} +1 -1
  377. package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
  378. package/dist/dashboard/{scene.js → play/scene.js} +14 -14
  379. package/dist/dashboard/{turns.js → play/turns.js} +12 -12
  380. package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
  381. package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
  382. package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
  383. package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
  384. package/dist/dashboard/{setup.js → settings/setup.js} +5 -5
  385. package/dist/dashboard/{party.js → sheet/party.js} +8 -8
  386. package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
  387. package/dist/dashboard/{sheet.js → sheet/sheet.js} +27 -24
  388. package/dist/dashboard/{story.js → sheet/story.js} +3 -3
  389. package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
  390. package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
  391. package/dist/dashboard/{master.js → shell/master.js} +2 -2
  392. package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
  393. package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
  394. package/dist/dashboard/shell/shown.js +38 -0
  395. package/dist/dashboard/{table.js → shell/table.js} +2 -2
  396. package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
  397. package/dist/dashboard/{top.js → shell/top.js} +7 -7
  398. package/dist/dashboard/style.css +288 -4
  399. package/dist/dashboard/world/calendar.js +4 -4
  400. package/dist/dashboard/world/drawing.js +92 -0
  401. package/dist/dashboard/world/key.js +21 -0
  402. package/dist/dashboard/world/lore.js +10 -6
  403. package/dist/dashboard/world/map-card.js +186 -0
  404. package/dist/dashboard/world/place-card.js +39 -0
  405. package/dist/dashboard/world/places.js +29 -0
  406. package/dist/dashboard/world/world.js +9 -341
  407. package/dist/extensions/extension.d.ts +1 -1
  408. package/dist/extensions/extension.js +1 -1
  409. package/dist/images/images.js +12 -9
  410. package/dist/index.d.ts +1 -1
  411. package/dist/languages/index.d.ts +1 -1
  412. package/dist/languages/index.js +1 -1
  413. package/dist/packages/npm.js +1 -1
  414. package/dist/page.d.ts +2 -2
  415. package/dist/page.js +1 -1
  416. package/dist/pages/check.js +23 -1
  417. package/dist/pages/containers.d.ts +1 -1
  418. package/dist/pages/containers.js +1 -1
  419. package/dist/pages/index.d.ts +4 -2
  420. package/dist/pages/index.js +4 -2
  421. package/dist/pages/inheritance.d.ts +2 -2
  422. package/dist/pages/layers.d.ts +52 -0
  423. package/dist/pages/layers.js +105 -0
  424. package/dist/pages/markdown.d.ts +5 -1
  425. package/dist/pages/markdown.js +13 -1
  426. package/dist/pages/rename-page.js +1 -1
  427. package/dist/pages/stacks/writes.js +48 -22
  428. package/dist/pages/standard-fields.d.ts +1 -1
  429. package/dist/pages/system-pages.d.ts +5 -3
  430. package/dist/pages/system-pages.js +16 -7
  431. package/dist/pages/world.d.ts +8 -1
  432. package/dist/pages/world.js +16 -4
  433. package/dist/pages/write-layer.d.ts +23 -0
  434. package/dist/pages/write-layer.js +162 -0
  435. package/dist/pages/write-page.d.ts +2 -2
  436. package/dist/pages/write-page.js +2 -2
  437. package/dist/rules/index.d.ts +1 -1
  438. package/dist/rules/index.js +1 -1
  439. package/dist/rules/search.d.ts +1 -1
  440. package/dist/rules/shown.d.ts +1 -1
  441. package/dist/server/dashboard/choices.d.ts +2 -0
  442. package/dist/server/dashboard/choices.js +6 -4
  443. package/dist/server/dashboard/files.js +5 -5
  444. package/dist/server/dashboard/index.d.ts +2 -2
  445. package/dist/server/dashboard/index.js +7 -3
  446. package/dist/server/dashboard/news.js +4 -3
  447. package/dist/server/dashboard/player.js +1 -1
  448. package/dist/server/dashboard/writes.d.ts +7 -0
  449. package/dist/server/dashboard/writes.js +48 -7
  450. package/dist/server/mcp.js +28 -13
  451. package/dist/systems/campaign-data.d.ts +15 -0
  452. package/dist/systems/campaign-data.js +85 -0
  453. package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
  454. package/dist/systems/{system-code.js → code.js} +2 -2
  455. package/dist/systems/game-system.d.ts +7 -61
  456. package/dist/systems/game-system.js +1 -984
  457. package/dist/systems/index.d.ts +6 -3
  458. package/dist/systems/index.js +6 -3
  459. package/dist/systems/installed.d.ts +31 -0
  460. package/dist/systems/installed.js +89 -0
  461. package/dist/systems/maps.d.ts +3 -0
  462. package/dist/systems/maps.js +9 -0
  463. package/dist/systems/read.d.ts +3 -0
  464. package/dist/systems/read.js +471 -0
  465. package/dist/systems/schema.d.ts +289 -0
  466. package/dist/systems/schema.js +243 -0
  467. package/dist/systems/settings.d.ts +19 -0
  468. package/dist/systems/settings.js +78 -0
  469. package/dist/systems/versions.d.ts +12 -0
  470. package/dist/systems/versions.js +52 -0
  471. package/dist/testing/index.js +1 -1
  472. package/instructions/import.md +1 -1
  473. package/instructions/play.md +1 -1
  474. package/instructions/voices.md +1 -1
  475. package/package.json +1 -1
  476. package/dist/commands/config.js +0 -948
  477. package/dist/commands/package.d.ts +0 -143
  478. package/dist/commands/package.js +0 -785
  479. package/dist/commands/scene.js +0 -894
  480. package/dist/commands/shared/worked-out.js +0 -805
  481. package/dist/dashboard/place/map-view.js +0 -417
  482. /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
  483. /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
  484. /package/dist/core/{package-api.js → packages/api.js} +0 -0
  485. /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
  486. /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
  487. /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
  488. /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
  489. /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
  490. /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
  491. /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
  492. /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
  493. /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
  494. /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
  495. /package/dist/languages/{language-pack.js → pack.js} +0 -0
  496. /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
  497. /package/dist/pages/{page-file.js → file.js} +0 -0
  498. /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
  499. /package/dist/pages/{page-types.js → types.js} +0 -0
  500. /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
  501. /package/dist/rules/{rule-book.js → book.js} +0 -0
  502. /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
  503. /package/dist/systems/{system-folders.js → folders.js} +0 -0
@@ -244,6 +244,13 @@
244
244
  translate: 0 0 !important;
245
245
  }
246
246
 
247
+ /* The asterisk of a changed page stands in narrow cards: its tooltip in lines, never wider than its card. */
248
+ .changed-mark[data-tip]::before {
249
+ width: max-content !important;
250
+ max-width: 200px !important;
251
+ white-space: normal !important;
252
+ }
253
+
247
254
  /* How a number is made, in its tooltip (FOR-8): lines that wrap, its free roll on the last. */
248
255
  [data-tip].tip-wide::before {
249
256
  width: max-content !important;
@@ -343,6 +350,25 @@
343
350
  translate: 0 50% !important;
344
351
  }
345
352
 
353
+ /* On a phone a hidden tip takes no room, as one wider than the window would widen the page with the text zoomed; shown, it wraps in the window. */
354
+ @media (max-width: 600px) {
355
+ [data-tip]:not(:focus-visible)::before {
356
+ display: none !important;
357
+ }
358
+
359
+ [data-tip]::before {
360
+ width: max-content !important;
361
+ max-width: calc(100vw - 32px) !important;
362
+ white-space: pre-line !important;
363
+ }
364
+ }
365
+
366
+ @media (max-width: 600px) and (hover: hover) {
367
+ [data-tip]:hover::before {
368
+ display: block !important;
369
+ }
370
+ }
371
+
346
372
  /* The title takes the focus for a screen reader to read it; no ring, as it is no control. */
347
373
  .reader-head h3:focus {
348
374
  outline: none !important;
@@ -421,7 +447,8 @@
421
447
  /* The texture stays with the window, the light above scrolls away with the page's top, as without a theme. */
422
448
  background-attachment: scroll, fixed, fixed, scroll;
423
449
  color: var(--ink);
424
- font: 15px/1.4 var(--font);
450
+ /* 15px at the browser's own size, and larger with the reader's: what is set in rem and in em grows together. */
451
+ font: 0.9375rem/1.4 var(--font);
425
452
  }
426
453
 
427
454
  /* The serif is the story's voice alone: the campaign's name, and the master's question (D-282); the name in the game's titles' face, when it gives one. */
@@ -650,6 +677,15 @@
650
677
  white-space: nowrap;
651
678
  }
652
679
 
680
+ /* On a phone a title that does not fit, as one long word with the text zoomed, wraps and breaks rather than widen the page. */
681
+ @media (max-width: 600px) {
682
+ summary :is(h3, .rolls-title),
683
+ .table-card > summary h2 {
684
+ white-space: normal;
685
+ overflow-wrap: anywhere;
686
+ }
687
+ }
688
+
653
689
  /* A card of the table: no padding of its own, so its header runs to its edges, and its list touches the header's rule. */
654
690
  .table-card > summary {
655
691
  margin: 0;
@@ -7524,6 +7560,79 @@
7524
7560
  font-weight: 650;
7525
7561
  }
7526
7562
  }
7563
+ /* A page of the game system that the campaign changed: the asterisk after its name, and its line in the head of a page read whole. */
7564
+ @layer parts {
7565
+ /* The asterisk after a name, no control: quiet, never the accent, which on the dark page is the gold of what is equipped or chosen. */
7566
+ .changed-mark {
7567
+ position: relative;
7568
+ display: inline-block;
7569
+ margin-inline-start: 0.35em;
7570
+ color: var(--muted);
7571
+ text-indent: 0;
7572
+ vertical-align: -0.08em;
7573
+ }
7574
+
7575
+ .changed-icon {
7576
+ display: block;
7577
+ flex: none;
7578
+ width: 0.75rem;
7579
+ height: 0.75rem;
7580
+ fill: none;
7581
+ stroke: currentColor;
7582
+ stroke-width: 2.8;
7583
+ stroke-linecap: round;
7584
+ /* Raised, as a note's mark stands over its word: in a line of text and in a chip alike. */
7585
+ translate: 0 -0.22em;
7586
+ }
7587
+
7588
+ /* In a chip the asterisk stands inside it, after the name; after a name that acts, inside the chip's own room. */
7589
+ .chips li:has(> .changed-mark) {
7590
+ display: inline-flex;
7591
+ align-items: center;
7592
+ }
7593
+
7594
+ .chips.acting li > .changed-mark {
7595
+ margin-inline: -4px 8px;
7596
+ }
7597
+
7598
+ /* On touch a name that acts is taller: the asterisk after it keeps the middle of its line. */
7599
+ @media (pointer: coarse) {
7600
+ .items th > .act + .changed-mark {
7601
+ display: inline-flex;
7602
+ align-items: center;
7603
+ min-height: 36px;
7604
+ vertical-align: top;
7605
+ }
7606
+ }
7607
+
7608
+ /* In the head of a page read whole: the asterisk and the words, which lead to what changed. */
7609
+ .changed-line {
7610
+ margin: 6px 0 0;
7611
+ color: var(--muted);
7612
+ font-size: 0.85rem;
7613
+ }
7614
+
7615
+ .changed-line > :is(a, span) {
7616
+ display: inline-flex;
7617
+ align-items: center;
7618
+ gap: 5px;
7619
+ border-radius: var(--radius-xs);
7620
+ }
7621
+
7622
+ .changed-line > a {
7623
+ color: var(--accent);
7624
+ font-weight: 600;
7625
+ text-decoration: underline;
7626
+ text-decoration-thickness: 1px;
7627
+ text-underline-offset: 2px;
7628
+ }
7629
+
7630
+ @media (pointer: coarse) {
7631
+ .changed-line > a {
7632
+ min-height: var(--target);
7633
+ }
7634
+ }
7635
+ }
7527
7636
  /* Settings. */
7528
7637
  @layer pages {
7529
7638
  /* The Settings section (D-341): the player's settings of the campaign in groups, each with what it is and its values, the chosen one in gold and what it
@@ -7965,6 +8074,7 @@
7965
8074
  /* Where fingers touch, every control as tall as a finger. */
7966
8075
  @media (pointer: coarse) {
7967
8076
  .segmented button {
8077
+ min-width: var(--target);
7968
8078
  min-height: var(--target);
7969
8079
  }
7970
8080
 
@@ -8005,6 +8115,11 @@
8005
8115
  width: 100%;
8006
8116
  }
8007
8117
 
8118
+ /* The field gives way to Add, with the text zoomed too: its own width would widen the page. */
8119
+ .setting-list form input {
8120
+ width: 0;
8121
+ }
8122
+
8008
8123
  /* On a phone the values share the row. */
8009
8124
  .segmented {
8010
8125
  display: flex;
@@ -9927,6 +10042,12 @@
9927
10042
  .sheet-body {
9928
10043
  display: block;
9929
10044
  }
10045
+
10046
+ /* The name and what is said of them stay inside the band, with the text zoomed too. */
10047
+ .identity .who {
10048
+ min-width: 0;
10049
+ overflow-wrap: anywhere;
10050
+ }
9930
10051
  }
9931
10052
 
9932
10053
  /* A thing in a list of bonds, as attuned: two rings after its name, in the accent. */
@@ -10343,7 +10464,8 @@
10343
10464
  height: 30px;
10344
10465
  }
10345
10466
 
10346
- .setup-list input {
10467
+ .setup-list input,
10468
+ .setup-chip {
10347
10469
  min-height: var(--target);
10348
10470
  }
10349
10471
  }
@@ -10547,6 +10669,11 @@
10547
10669
  .help-index {
10548
10670
  display: none;
10549
10671
  }
10672
+
10673
+ /* An address in a line breaks where it must, with the text zoomed too; in a table and a block of code it stays whole, as they scroll. */
10674
+ .guide :not(pre, td) > code {
10675
+ overflow-wrap: anywhere;
10676
+ }
10550
10677
  }
10551
10678
  }
10552
10679
  /* About. */
@@ -11850,8 +11977,12 @@
11850
11977
  white-space: nowrap;
11851
11978
  }
11852
11979
 
11853
- /* On a phone the notice says whose turn alone: the round is on the Scene. */
11980
+ /* On a phone the notice says whose turn alone: the round is on the Scene; Go to the scene goes under it when the row cannot hold both. */
11854
11981
  @media (max-width: 600px) {
11982
+ .turn-notice {
11983
+ flex-wrap: wrap;
11984
+ }
11985
+
11855
11986
  .turn-notice-round {
11856
11987
  display: none;
11857
11988
  }
@@ -14291,6 +14422,21 @@
14291
14422
  }
14292
14423
  }
14293
14424
 
14425
+ /* On touch the switch, and on a phone the link on its own line, are as tall as a finger needs. */
14426
+ @media (max-width: 600px) and (pointer: coarse) {
14427
+ .package-report {
14428
+ display: flex;
14429
+ align-items: center;
14430
+ min-height: var(--target);
14431
+ }
14432
+ }
14433
+
14434
+ @media (pointer: coarse) {
14435
+ .package-use {
14436
+ min-height: var(--target);
14437
+ }
14438
+ }
14439
+
14294
14440
  /* Where a package is already, the system in use, an adventure in the story: words, never a button. */
14295
14441
  .package-here,
14296
14442
  .package-lock {
@@ -14493,6 +14639,119 @@
14493
14639
  color: var(--ink);
14494
14640
  }
14495
14641
 
14642
+ /* The pages of the game system the campaign changed (D-564), under the system it plays, from the words' column: a small heading, a line of what they
14643
+ are, then each page, its name and Put back on a line, what changed under them. */
14644
+ .package-row > .package-changes {
14645
+ grid-column: 2 / -1;
14646
+ }
14647
+
14648
+ .package-changes {
14649
+ display: grid;
14650
+ grid-template-columns: minmax(0, 1fr);
14651
+ gap: 4px;
14652
+ margin-top: 6px;
14653
+ padding-top: 12px;
14654
+ border-top: 1px dashed var(--rule);
14655
+ }
14656
+
14657
+ .package-changes > .package-sub {
14658
+ display: flex;
14659
+ align-items: baseline;
14660
+ gap: 8px;
14661
+ }
14662
+
14663
+ .package-changes > .package-sub .package-count {
14664
+ letter-spacing: 0;
14665
+ }
14666
+
14667
+ .changed-list {
14668
+ display: grid;
14669
+ margin: 4px 0 0;
14670
+ padding: 0;
14671
+ list-style: none;
14672
+ }
14673
+
14674
+ .changed-page {
14675
+ display: grid;
14676
+ grid-template-columns: minmax(0, 1fr) auto;
14677
+ align-items: center;
14678
+ gap: 2px 12px;
14679
+ padding: 8px 0;
14680
+ border-top: 1px solid var(--rule);
14681
+ }
14682
+
14683
+ .changed-page > :is(.changed-fields, .package-note, .package-said) {
14684
+ grid-column: 1 / -1;
14685
+ }
14686
+
14687
+ /* What changed, a line each: the field's label in its column, as wide in every page, then what the system gave, an arrow, what the campaign has. */
14688
+ .changed-fields {
14689
+ display: grid;
14690
+ grid-template-columns: 8.5em minmax(0, 1fr);
14691
+ gap: 2px 12px;
14692
+ margin: 0;
14693
+ padding: 0;
14694
+ list-style: none;
14695
+ font-size: 0.85rem;
14696
+ overflow-wrap: anywhere;
14697
+ }
14698
+
14699
+ .changed-fields > li {
14700
+ display: grid;
14701
+ grid-template-columns: subgrid;
14702
+ grid-column: 1 / -1;
14703
+ align-items: baseline;
14704
+ }
14705
+
14706
+ .changed-field,
14707
+ .changed-was,
14708
+ .changed-new {
14709
+ color: var(--muted);
14710
+ }
14711
+
14712
+ .changed-values {
14713
+ display: flex;
14714
+ flex-wrap: wrap;
14715
+ align-items: baseline;
14716
+ gap: 0 6px;
14717
+ min-width: 0;
14718
+ }
14719
+
14720
+ .changed-now {
14721
+ font-weight: 650;
14722
+ }
14723
+
14724
+ /* The arrow and what it leads to: together on a new line when the two values do not fit on one. */
14725
+ .changed-to {
14726
+ display: inline-flex;
14727
+ align-items: baseline;
14728
+ gap: 6px;
14729
+ min-width: 0;
14730
+ }
14731
+
14732
+ .changed-arrow {
14733
+ flex: none;
14734
+ align-self: center;
14735
+ color: var(--muted);
14736
+ }
14737
+
14738
+ .changed-arrow svg.icon {
14739
+ display: block;
14740
+ width: 14px;
14741
+ height: 14px;
14742
+ }
14743
+
14744
+ /* While a scene is played nothing is put back: said over the list in the ink, apart from the line of what the list is. */
14745
+ .changed-waits {
14746
+ color: var(--ink);
14747
+ font-weight: 600;
14748
+ }
14749
+
14750
+ /* In the question, what goes back: the list's lines turned round, under their sentence. */
14751
+ .confirm .changed-fields {
14752
+ margin-top: 8px;
14753
+ }
14754
+
14496
14755
  /* What a package's latest needs of the engine (D-515 (2)), under its meta: the words in --muted, the way to the engine's card in the accent. */
14497
14756
  .package-needs {
14498
14757
  display: flex;
@@ -14707,11 +14966,31 @@
14707
14966
  grid-column: auto;
14708
14967
  }
14709
14968
 
14710
- .package-row > :is(.package-progress, .package-window, .package-said),
14969
+ .package-row > :is(.package-progress, .package-window, .package-said, .package-changes),
14711
14970
  .package-credits {
14712
14971
  grid-column: 1 / -1;
14713
14972
  }
14714
14973
 
14974
+ /* A changed page: Put back goes under its name when the two do not fit, as with the text zoomed; the labels take what they need, half at most. */
14975
+ .changed-page {
14976
+ display: flex;
14977
+ flex-wrap: wrap;
14978
+ justify-content: space-between;
14979
+ }
14980
+
14981
+ .changed-page > .package-title {
14982
+ flex: 1 1 8em;
14983
+ min-width: 0;
14984
+ }
14985
+
14986
+ .changed-page > :is(.changed-fields, .package-note, .package-said) {
14987
+ flex: 0 0 100%;
14988
+ }
14989
+
14990
+ .changed-fields {
14991
+ grid-template-columns: fit-content(45%) minmax(0, 1fr);
14992
+ }
14993
+
14715
14994
  .package-add-line input {
14716
14995
  flex-basis: 100%;
14717
14996
  }
@@ -15394,6 +15673,11 @@
15394
15673
  .choice-chosen .icon-button {
15395
15674
  width: var(--target);
15396
15675
  }
15676
+
15677
+ .choice-read {
15678
+ width: var(--target);
15679
+ height: var(--target);
15680
+ }
15397
15681
  }
15398
15682
 
15399
15683
  /* On a phone the notice's words take the room; the chevron says where it leads. */
@@ -5,10 +5,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-ru
5
5
  // calendar start, the days of the story in the same rows, by their number.
6
6
  import { useEffect, useRef, useState } from "preact/hooks";
7
7
  import { sectionAddress } from "../address.js";
8
- import { CardHead, useMedia } from "../card.js";
9
- import { calendarDayLabel, calendarMonthLabel, gameDateLabel, seasonLabel } from "../game-words.js";
10
- import { Icon, iconPath } from "../icons.js";
11
- import { Deadline } from "../journal.js";
8
+ import { Deadline } from "../journal/journal.js";
9
+ import { CardHead, useMedia } from "../parts/card.js";
10
+ import { calendarDayLabel, calendarMonthLabel, gameDateLabel, seasonLabel } from "../parts/game-words.js";
11
+ import { Icon, iconPath } from "../parts/icons.js";
12
12
  import { arrowStep, capitalized, isolated, listText, t } from "../text.js";
13
13
  import { calendarDateOf, dayMarks, monthAt, monthOffsetOf, storyDays } from "./days.js";
14
14
  export function CalendarTab({ calendar }) {
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
2
+ import { terrainLabel } from "../parts/game-words.js";
3
+ import { Glass, GlassDefs } from "../parts/glass.js";
4
+ import { biomes, placeKinds, symbolRadius } from "../parts/map-symbols.js";
5
+ import { t } from "../text.js";
6
+ import { fading, hexCorners, hexesOf, marksOf, nameRun, nameShares, pathOf, placeAreaLabels, placeLabels, regionEdges, riverOutline, scaleBar } from "./map.js";
7
+ // The ways in the order they are drawn, the rivers under the roads.
8
+ const wayOrder = ["river", "road", "path"];
9
+ /**
10
+ * The drawing, from the view: the paper, the hexes lit and fogged with the marks of their biome and the ink round each region, the ways drawn by hand with
11
+ * their tails into the fog, the trail, the places, the party, the labels, the compass and the scale.
12
+ */
13
+ export function Drawing({ map, layout, ways, trails, lifted, ghost, passages, lead, view, size, narrow, chosen }) {
14
+ const { width, height } = size;
15
+ const X = (x) => width / 2 + (x - view.x) * view.s;
16
+ const Y = (y) => height / 2 - (y - view.y) * view.s;
17
+ const screen = (points) => points.map((point) => ({ x: X(point.x), y: Y(point.y) }));
18
+ const line = (points) => pathOf(screen(points));
19
+ const { across, hexes } = hexesOf(view, width, height, lifted, layout.regions);
20
+ const hexPixels = across * view.s;
21
+ const edges = regionEdges(hexes, across);
22
+ const scale = scaleBar(view.s, map.unit);
23
+ const image = lead?.image === undefined ? undefined : `/images/${encodeURIComponent(lead.image.file)}?v=${lead.image.version}`;
24
+ const party = map.party;
25
+ // Ink a little bolder near, finer far.
26
+ const weight = Math.min(1.5, Math.max(0.7, view.s / 8));
27
+ const drawn = [...ways].sort((first, second) => wayRank(first.kind) - wayRank(second.kind));
28
+ // What the labels must leave free: the tools, the compass, the scale and the places' symbols; the regions' names go first, below their middle, above, across it.
29
+ const reserved = [{ x: width - 64, y: 0, width: 64, height: 220 }, { x: 0, y: 0, width: 80, height: 86 }, { x: 0, y: height - 50, width: 210, height: 50 }];
30
+ const markBoxes = layout.spots.map((spot) => ({ x: X(spot.x) - symbolOf(spot).r, y: Y(spot.y) - symbolOf(spot).r, width: symbolOf(spot).r * 2, height: symbolOf(spot).r * 2 }));
31
+ const regionWishes = layout.regions.map((region) => ({
32
+ x: X(region.x),
33
+ ys: nameShares(region, hexes).map((share) => Y(region.y + region.radius * share)),
34
+ width: region.name.length * 14,
35
+ height: region.terrain === undefined ? 20 : 34,
36
+ }));
37
+ const regionLabels = placeAreaLabels(regionWishes, markBoxes, reserved, width, height);
38
+ const regionBoxes = regionLabels.flatMap((placed, index) => placed === undefined ? [] : [{ x: placed.x - regionWishes[index].width / 2 - 3, y: placed.y - 15, width: regionWishes[index].width + 6, height: regionWishes[index].height }]);
39
+ // A way's name along its longest run between two stops on the screen, following its bends, when the run holds it.
40
+ const wayNames = drawn.map((way) => {
41
+ const run = nameRun(screen(way.course), way.stops, way.name.length * 7.5 + 60);
42
+ // The bends of a river or a path would scatter its name: it goes along their way instead, beside them.
43
+ return run === undefined || wayLook(way.kind) === "road" ? run : [run[0], run.at(-1)];
44
+ });
45
+ const labels = placeLabels(layout.spots.map((spot) => {
46
+ const isParty = spot === layout.partySpot;
47
+ const big = isParty || (placeKinds[spot.kind ?? ""]?.size ?? 0) >= 2;
48
+ return { text: spot.name, x: X(spot.x), y: Y(spot.y), r: isParty ? 19 : symbolOf(spot).r + 1, size: big ? 16 : 13.5, weight: weightOf(spot, layout) };
49
+ }), markBoxes, [...reserved, ...regionBoxes], width, height);
50
+ return (_jsxs("svg", { class: "map-svg", viewBox: `0 0 ${width} ${height}`, "aria-hidden": "true", children: [_jsxs("defs", { children: [_jsx(GlassDefs, { prefix: "map" }), _jsxs("filter", { id: "map-grain", x: "0", y: "0", width: "100%", height: "100%", children: [_jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.9", numOctaves: 3, seed: 2 }), _jsx("feColorMatrix", { values: "0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.12 0 0 0 0.09 0" }), _jsx("feComposite", { in2: "SourceGraphic", operator: "in" })] }), _jsxs("filter", { id: "map-ink", x: "-5%", y: "-5%", width: "110%", height: "110%", children: [_jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.05", numOctaves: 2, seed: 4 }), _jsx("feDisplacementMap", { in: "SourceGraphic", scale: 2.2 })] }), _jsxs("radialGradient", { id: "map-age", cx: "50%", cy: "50%", r: "72%", children: [_jsx("stop", { offset: "0.62", "stop-color": "#6e5028", "stop-opacity": "0" }), _jsx("stop", { offset: "1", "stop-color": "#6e5028", "stop-opacity": "0.3" })] }), _jsx("clipPath", { id: "map-token", children: _jsx("circle", { r: 13 }) }), wayNames.map((run, index) => run === undefined ? null : _jsx("path", { id: `world-way-name-${index}`, d: pathOf(run) }, index))] }), _jsx("rect", { class: "map-fog", width: width, height: height }), hexes.map((hex, index) => (_jsx("polygon", { class: hex.lit ? `hex lit ${biomeLook(hex.biome)}` : "hex fogged", "fill-opacity": hex.lit ? (0.8 + hex.tone * 0.2).toFixed(2) : undefined, points: hexCorners(hex, across).map((corner) => `${X(corner.x).toFixed(1)},${Y(corner.y).toFixed(1)}`).join(" ") }, index))), hexPixels >= 24 && (_jsx("g", { class: "tufts", children: hexes.filter((hex) => hex.lit && hex.biome !== undefined && biomes[hex.biome] !== undefined).flatMap((hex, index) => marksOf(hex, hexPixels).map((mark, at) => (_jsx("path", { class: `tuft ${hex.biome}`, transform: `translate(${(X(hex.x) + mark.x).toFixed(1)} ${(Y(hex.y) + mark.y).toFixed(1)}) scale(${mark.scale.toFixed(2)})`, d: biomes[hex.biome ?? ""].mark }, `${index} ${at}`)))) })), [...edges].map(([region, segments]) => (_jsx("path", { class: `region-edge ${biomeLook(layout.regions.find((one) => one.name === region)?.biome)}${region === chosen ? " selected" : ""}`, d: segments.map(([from, to]) => `M${X(from.x).toFixed(1)} ${Y(from.y).toFixed(1)}L${X(to.x).toFixed(1)} ${Y(to.y).toFixed(1)}`).join(""), filter: "url(#map-ink)" }, region))), _jsx("rect", { class: "map-grain", width: width, height: height, filter: "url(#map-grain)" }), trails.map((run, index) => _jsx("path", { class: "trail", d: line(run) }, index)), drawn.filter((way) => way.name === chosen).map((way, index) => _jsx("path", { class: "chosen-way", d: line(way.course) }, index)), ghost !== undefined && (_jsxs("g", { class: "ghost", children: [ghost.ways.map((way, index) => _jsx(WayDrawing, { way: way, look: wayLook(way.kind), screen: screen, weight: weight }, `${way.name} ${index}`)), ghost.spots.map((spot) => _jsx(PlaceSymbol, { spot: spot, x: X(spot.x), y: Y(spot.y), chosen: false }, spot.name))] })), drawn.map((way, index) => _jsx(WayDrawing, { way: way, look: wayLook(way.kind), screen: screen, weight: weight }, `${way.name} ${index}`)), drawn.map((way, index) => wayNames[index] === undefined ? null : (_jsx("text", { class: `way-label ${wayLook(way.kind)}`, dy: wayLook(way.kind) === "river" ? -16 : -6, children: _jsx("textPath", { href: `#world-way-name-${index}`, startOffset: "50%", "text-anchor": "middle", children: way.name }) }, `${way.name} ${index}`))), _jsx("rect", { class: "map-age", width: width, height: height, fill: "url(#map-age)" }), layout.spots.filter((spot) => passages.includes(spot.name)).map((spot) => _jsx("circle", { class: "passage-ring", cx: X(spot.x), cy: Y(spot.y), r: symbolOf(spot).r + 5 }, spot.name)), layout.spots.filter((spot) => spot !== layout.partySpot).map((spot) => _jsx(PlaceSymbol, { spot: spot, x: X(spot.x), y: Y(spot.y), chosen: spot.name === chosen }, spot.name)), party !== undefined && (_jsxs("g", { class: layout.partySpot !== undefined && layout.partySpot.name === chosen ? "party-mark selected" : "party-mark", transform: `translate(${X(party.x).toFixed(1)} ${Y(party.y).toFixed(1)})`, "data-place": layout.partySpot?.name, children: [_jsx("circle", { class: "party-pulse", r: 17 }), _jsxs("g", { filter: "url(#map-drop)", children: [_jsx("circle", { class: "party-ring", r: 17 }), _jsx("circle", { class: "party-disc", r: 14.5 }), image !== undefined && _jsx("image", { href: image, x: -13, y: -13, width: 26, height: 26, "clip-path": "url(#map-token)" }), _jsx(Glass, { r: 14.5, prefix: "map" })] })] })), _jsxs("g", { class: "labels", children: [layout.regions.map((region, index) => {
51
+ const placed = regionLabels[index];
52
+ return placed === undefined ? null : (_jsxs("g", { children: [_jsx("text", { class: "label region-label", x: placed.x, y: placed.y, "text-anchor": "middle", children: region.name }), region.terrain !== undefined && _jsx("text", { class: "label region-note", x: placed.x, y: placed.y + 15, "text-anchor": "middle", children: terrainLabel(region.terrain) })] }, region.name));
53
+ }), layout.spots.map((spot, index) => {
54
+ const label = labels[index];
55
+ const big = spot === layout.partySpot || (placeKinds[spot.kind ?? ""]?.size ?? 0) >= 2;
56
+ return label.hidden ? null : _jsx("text", { class: `label place-label${big ? " big" : ""}`, x: label.x, y: label.y, "text-anchor": label.anchor, children: label.text }, spot.name);
57
+ })] }), _jsxs("g", { class: "compass", transform: `translate(${narrow ? 34 : 40} ${narrow ? 42 : 46}) scale(${narrow ? 0.85 : 1})`, children: [_jsx("circle", { class: "compass-ring", r: 15 }), _jsx("path", { class: "compass-diagonals", d: "M-12-12 12 12 M-12 12 12-12" }), _jsx("path", { class: "compass-point", d: "M0-26 5-5 26 0 5 5 0 26-5 5-26 0-5-5Z" }), _jsx("path", { class: "compass-shade", d: "M0-26 5-5 0 0Z M26 0 5 5 0 0Z M0 26-5 5 0 0Z M-26 0-5-5 0 0Z" }), _jsx("text", { class: "compass-n", y: -30, "text-anchor": "middle", children: "N" })] }), _jsxs("g", { class: "scale", transform: `translate(16 ${height - 22})`, children: [_jsx("rect", { class: "scale-back", x: -8, y: -20, width: scale.width + 64, height: 34, rx: 6 }), _jsx("rect", { class: "scale-a", width: scale.width / 2, height: 5 }), _jsx("rect", { class: "scale-b", x: scale.width / 2, width: scale.width / 2, height: 5 }), _jsx("text", { class: "scale-text", x: 0, y: -8, children: "0" }), _jsx("text", { class: "scale-text", x: scale.width, y: -8, "text-anchor": "middle", children: scale.value }), _jsx("text", { class: "scale-text", x: scale.width + 8, y: 5, children: map.unit.name === "km" ? "km" : t("miles") })] })] }));
58
+ }
59
+ /** A place's symbol by its kind: a disc with its picture, in four sizes; a kind the page does not know, a plain dot. */
60
+ export function PlaceSymbol({ spot, x, y, chosen }) {
61
+ const kind = spot.kind === undefined ? undefined : placeKinds[spot.kind];
62
+ const { r } = symbolOf(spot);
63
+ const scale = r * 1.62 / 24;
64
+ return (_jsxs("g", { class: `spot size-${kind?.size ?? "dot"}${chosen ? " selected" : ""}`, transform: `translate(${x.toFixed(1)} ${y.toFixed(1)})`, "data-place": spot.name, children: [kind === undefined ? _jsx("circle", { class: "spot-dot", r: 4 }) : (_jsxs("g", { filter: "url(#map-drop)", children: [_jsx("circle", { class: "spot-disc", r: r }), _jsx("path", { class: "spot-glyph", transform: `translate(${-12 * scale} ${-12 * scale}) scale(${scale})`, d: kind.glyph }), _jsx(Glass, { r: r, prefix: "map" })] })), _jsx("circle", { class: "spot-hit", r: Math.max(r, 16) })] }));
65
+ }
66
+ /** The look of a biome: its own when the page draws it, the bare land for none, another for one it does not know. */
67
+ export function biomeLook(biome) {
68
+ return biome === undefined ? "open" : biomes[biome] !== undefined ? biome : "unknown-biome";
69
+ }
70
+ export function wayLook(kind) {
71
+ return wayOrder.includes(kind) ? kind : "other";
72
+ }
73
+ export function wayRank(kind) {
74
+ const rank = wayOrder.indexOf(wayLook(kind));
75
+ return rank < 0 ? wayOrder.length : rank;
76
+ }
77
+ /**
78
+ * A way drawn by hand, in the map's ink: a road as two lines, a path dashed, a river in water widening toward its mouth, outlined in ink; its tails fade into
79
+ * the fog.
80
+ */
81
+ function WayDrawing({ way, look, screen, weight }) {
82
+ const course = screen(way.course);
83
+ return (_jsxs("g", { class: `way-drawing ${look}`, children: [way.tails.map((tail) => fading(screen(tail.course)).map((piece, index) => (_jsx("path", { class: `tail ${look}`, d: pathOf(piece.points), "stroke-opacity": piece.opacity.toFixed(2), "stroke-width": (look === "river" ? (tail.from === "before" ? 1.6 : 4.4) : look === "road" ? 2.2 : 1.3) * weight }, `${tail.from} ${index}`)))), look === "river" && _jsx("path", { class: "river-water", d: riverOutline(course, 1.6 * weight, 4.6 * weight), filter: "url(#map-ink)" }), look === "road" && (_jsxs(_Fragment, { children: [_jsx("path", { class: "road-ink", d: pathOf(course), "stroke-width": 3.8 * weight, filter: "url(#map-ink)" }), _jsx("path", { class: "road-paper", d: pathOf(course), "stroke-width": 1.5 * weight })] })), (look === "path" || look === "other") && _jsx("path", { class: `${look}-ink`, d: pathOf(course), "stroke-width": 1.4 * weight, filter: "url(#map-ink)" })] }));
84
+ }
85
+ function symbolOf(spot) {
86
+ const kind = spot.kind === undefined ? undefined : placeKinds[spot.kind];
87
+ return { r: kind === undefined ? 5 : symbolRadius[kind.size] };
88
+ }
89
+ /** How much a place's name weighs for its room: the party's place, then the larger kinds, then those holding more. */
90
+ function weightOf(spot, layout) {
91
+ return (spot === layout.partySpot ? 100 : 0) + (placeKinds[spot.kind ?? ""]?.size ?? -1) * 20 + layout.inside(spot.name).length * 5;
92
+ }
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "preact/jsx-runtime";
2
+ import { biomeLabel, biomes, placeKindLabel, placeKinds } from "../parts/map-symbols.js";
3
+ import { t } from "../text.js";
4
+ import { biomeLook, PlaceSymbol, wayLook, wayRank } from "./drawing.js";
5
+ /** The key under the map: the ways, the trail and the party; the land's biomes, difficult terrain and the fog; the kinds of place on this map. */
6
+ export function Key({ map, layout, narrow, trail, passages }) {
7
+ // A passage is no line on the map: its ring says it (ROA-8).
8
+ const ways = [...new Set(map.roads.filter((road) => road.kind !== "portal").map((road) => wayLook(road.kind)))].sort((first, second) => wayRank(first) - wayRank(second));
9
+ const lands = [...new Set(layout.regions.map((region) => biomeLook(region.biome)))].filter((look) => look !== "open");
10
+ const kinds = [...new Set(layout.spots.map((spot) => (spot.kind !== undefined && placeKinds[spot.kind] !== undefined ? spot.kind : "other")))];
11
+ return (_jsxs("details", { class: "map-key", open: !narrow, children: [_jsx("summary", { children: t("Key") }), _jsxs("div", { class: "key-groups", children: [_jsxs("div", { class: "key-group", children: [_jsx("h4", { class: "eyebrow key-title", children: t("Ways") }), _jsxs("ul", { children: [ways.map((look) => (_jsxs("li", { children: [_jsxs("svg", { class: "key-way", viewBox: "0 0 30 16", "aria-hidden": "true", children: [look === "river" && _jsx("path", { class: "river-water", d: "M2 9.6Q8 5.8 15 8.2T28 6.6L28 9.6Q22 12 15 10.4T2 10.8Z" }), look === "road" && (_jsxs(_Fragment, { children: [_jsx("path", { class: "road-ink", d: "M2 9q7-4 13-1t13-1", "stroke-width": 3.8 }), _jsx("path", { class: "road-paper", d: "M2 9q7-4 13-1t13-1", "stroke-width": 1.5 })] })), (look === "path" || look === "other") && _jsx("path", { class: `${look}-ink`, d: "M2 9q7-4 13-1t13-1", "stroke-width": 1.4 })] }), wayLabel(look)] }, look))), trail && (_jsxs("li", { children: [_jsx("svg", { class: "key-way", viewBox: "0 0 30 16", "aria-hidden": "true", children: _jsx("path", { class: "trail", d: "M4 8h22" }) }), t("Your trail")] })), _jsxs("li", { children: [_jsxs("svg", { class: "key-symbol", viewBox: "-9 -9 18 18", "aria-hidden": "true", children: [_jsx("circle", { class: "party-ring", r: 7.5 }), _jsx("circle", { class: "party-disc", r: 5.5 })] }), t("Your party")] }), passages && (_jsxs("li", { children: [_jsx("svg", { class: "key-symbol", viewBox: "-12 -12 24 24", "aria-hidden": "true", children: _jsx("circle", { class: "passage-ring", r: 9 }) }), t("Passage to another map")] }))] })] }), _jsxs("div", { class: "key-group", children: [_jsx("h4", { class: "eyebrow key-title", children: t("Land") }), _jsxs("ul", { children: [lands.map((look) => (_jsxs("li", { children: [_jsx(BiomeSwatch, { look: look }), biomeLabel(look) ?? t("Other land")] }, look))), _jsxs("li", { children: [_jsx("svg", { class: "key-swatch", viewBox: "0 0 22 16", "aria-hidden": "true", children: _jsx("rect", { class: "hex fogged", x: 1, y: 1, width: 20, height: 14, rx: 3 }) }), t("Not found yet")] })] })] }), _jsxs("div", { class: "key-group", children: [_jsx("h4", { class: "eyebrow key-title", children: t("Places") }), _jsx("ul", { children: kinds.map((kind) => (_jsxs("li", { children: [_jsx("svg", { class: "key-symbol", viewBox: "-17 -17 34 34", "aria-hidden": "true", children: _jsx(PlaceSymbol, { spot: { name: kind, x: 0, y: 0, within: [], ...(kind === "other" ? {} : { kind }) }, x: 0, y: 0, chosen: false }) }), placeKindLabel(kind) ?? t("Other place")] }, kind))) })] })] })] }));
12
+ }
13
+ /** A biome's own picture, as the map draws its land: a tile in its colour with its mark, or the bare land for one the page does not know. */
14
+ export function BiomeSwatch({ look }) {
15
+ return (_jsxs("svg", { class: "key-swatch", viewBox: "0 0 22 16", "aria-hidden": "true", children: [_jsx("rect", { class: `hex lit ${look}`, x: 1, y: 1, width: 20, height: 14, rx: 3 }), biomes[look] !== undefined && _jsx("path", { class: `tuft ${look}`, transform: "translate(11 9)", d: biomes[look].mark })] }));
16
+ }
17
+ /** A kind of way by its name in the page's language: River, Road, Path. */
18
+ export function wayLabel(kind) {
19
+ const labels = { river: t("River"), road: t("Road"), path: t("Path"), portal: t("Portal"), other: t("Other way") };
20
+ return labels[kind] ?? `${kind[0]?.toUpperCase() ?? ""}${kind.slice(1)}`;
21
+ }
@@ -2,11 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-ru
2
2
  import { useEffect, useRef, useState } from "preact/hooks";
3
3
  import { sectionAddress } from "../address.js";
4
4
  import { pictureAddress, readView } from "../api.js";
5
- import { useMedia } from "../card.js";
6
- import { Icon } from "../icons.js";
7
- import { placeKindLabel, placeKinds } from "../map-symbols.js";
8
- import { knowersOf, Markdown, plainLine } from "../markdown.js";
9
- import { Token } from "../party.js";
5
+ import { useMedia } from "../parts/card.js";
6
+ import { ChangedLine } from "../parts/changed.js";
7
+ import { Icon } from "../parts/icons.js";
8
+ import { placeKindLabel, placeKinds } from "../parts/map-symbols.js";
9
+ import { knowersOf, Markdown, plainLine } from "../parts/markdown.js";
10
+ import { Token } from "../sheet/party.js";
10
11
  import { arrowStep, capitalized, foldedText, t } from "../text.js";
11
12
  import { documentLook, foundLore, groupedLore, knownTo, loreGroupOf } from "./known.js";
12
13
  // From this width the reader stands beside the list.
@@ -112,6 +113,8 @@ function LoreReader({ entry, version, link, onMap, focus, several, kinds }) {
112
113
  const [text, setText] = useState();
113
114
  // Who knows each secret, when not all the player characters do: said after its title, the one place the page names them (D-480 (7)).
114
115
  const [knowers, setKnowers] = useState([]);
116
+ // Whether the campaign changed it, or the page of the game system it derives from (D-564).
117
+ const [changed, setChanged] = useState(false);
115
118
  const [problem, setProblem] = useState(false);
116
119
  const reads = useRef(0);
117
120
  const title = useRef(null);
@@ -122,6 +125,7 @@ function LoreReader({ entry, version, link, onMap, focus, several, kinds }) {
122
125
  if (reading === reads.current) {
123
126
  setText(page.kind === "page" ? page.text : "");
124
127
  setKnowers(page.kind === "page" ? page.knownBy ?? [] : []);
128
+ setChanged(page.kind === "page" && page.layered === true);
125
129
  setProblem(false);
126
130
  }
127
131
  }, () => reading === reads.current && text === undefined && setProblem(true));
@@ -129,7 +133,7 @@ function LoreReader({ entry, version, link, onMap, focus, several, kinds }) {
129
133
  useOpened(title, focus);
130
134
  const person = entry.type === "character" || entry.type === "creature";
131
135
  const banner = entry.picture !== undefined && !person;
132
- return (_jsxs("article", { class: "browse-reader", "aria-labelledby": "reader-title", children: [banner && _jsx("img", { class: "reader-banner", src: pictureAddress(entry.picture), alt: "" }), _jsxs("header", { class: "reader-head", children: [person && _jsx(Token, { member: { name: entry.name, image: entry.picture, role: entry.companion ? "companion" : "other" }, large: true, ...(entry.companion ? { side: "ally" } : {}) }), _jsxs("div", { children: [_jsx("p", { class: "eyebrow", children: entryKind(entry, kinds) }), _jsx("h3", { id: "reader-title", tabIndex: -1, ref: title, children: entry.name }), entry.within !== undefined && (_jsxs("p", { class: "reader-where", children: [_jsx(Icon, { name: "place" }), _jsx("span", { class: "reader-path", children: entry.within.toReversed().map((place, index) => (_jsxs("span", { children: [index > 0 && _jsx("span", { class: "reader-step", "aria-hidden": "true" }), _jsx("a", { class: "md-link", href: sectionAddress("world", "lore", place), children: place })] }, place))) })] }))] })] }), (onMap !== undefined || entry.companion) && (_jsxs("p", { class: "reader-actions", children: [onMap !== undefined && (_jsxs("a", { class: "button package-button", href: onMap, children: [_jsx(Icon, { name: "world" }), t("Show on the map")] })), entry.companion && (_jsxs("a", { class: "button package-button", href: `#/party/${encodeURIComponent(entry.name)}`, children: [_jsx(Icon, { name: "party" }), t("Open the sheet")] }))] })), _jsxs("div", { class: "reader-text", children: [text === undefined && !problem && entry.summary !== "" && _jsx(Markdown, { text: entry.summary, link: link }), text !== undefined && text.trim() !== "" && _jsx(Markdown, { text: text, link: link, secretKnowers: several ? knowersOf(knowers) : undefined }), ((text !== undefined && text.trim() === "") || (text === undefined && entry.summary === "")) && !problem && (_jsx("p", { class: "browse-none", children: text === undefined ? t("Reading…") : t("Your character knows its name, and nothing more yet.") })), problem && _jsx("p", { class: "browse-none", children: t("This page could not be read now: try again in a moment.") })] })] }));
136
+ return (_jsxs("article", { class: "browse-reader", "aria-labelledby": "reader-title", children: [banner && _jsx("img", { class: "reader-banner", src: pictureAddress(entry.picture), alt: "" }), _jsxs("header", { class: "reader-head", children: [person && _jsx(Token, { member: { name: entry.name, image: entry.picture, role: entry.companion ? "companion" : "other" }, large: true, ...(entry.companion ? { side: "ally" } : {}) }), _jsxs("div", { children: [_jsx("p", { class: "eyebrow", children: entryKind(entry, kinds) }), _jsx("h3", { id: "reader-title", tabIndex: -1, ref: title, children: entry.name }), entry.within !== undefined && (_jsxs("p", { class: "reader-where", children: [_jsx(Icon, { name: "place" }), _jsx("span", { class: "reader-path", children: entry.within.toReversed().map((place, index) => (_jsxs("span", { children: [index > 0 && _jsx("span", { class: "reader-step", "aria-hidden": "true" }), _jsx("a", { class: "md-link", href: sectionAddress("world", "lore", place), children: place })] }, place))) })] })), changed && _jsx(ChangedLine, {})] })] }), (onMap !== undefined || entry.companion) && (_jsxs("p", { class: "reader-actions", children: [onMap !== undefined && (_jsxs("a", { class: "button package-button", href: onMap, children: [_jsx(Icon, { name: "world" }), t("Show on the map")] })), entry.companion && (_jsxs("a", { class: "button package-button", href: `#/party/${encodeURIComponent(entry.name)}`, children: [_jsx(Icon, { name: "party" }), t("Open the sheet")] }))] })), _jsxs("div", { class: "reader-text", children: [text === undefined && !problem && entry.summary !== "" && _jsx(Markdown, { text: entry.summary, link: link }), text !== undefined && text.trim() !== "" && _jsx(Markdown, { text: text, link: link, secretKnowers: several ? knowersOf(knowers) : undefined }), ((text !== undefined && text.trim() === "") || (text === undefined && entry.summary === "")) && !problem && (_jsx("p", { class: "browse-none", children: text === undefined ? t("Reading…") : t("Your character knows its name, and nothing more yet.") })), problem && _jsx("p", { class: "browse-none", children: t("This page could not be read now: try again in a moment.") })] })] }));
133
137
  }
134
138
  /** A document on its paper, as what it is: a letter, a notice, a torn page; its picture first, larger at a click, for a map above all. */
135
139
  function DocumentReader({ document, link, focus, several }) {