@serene-pub/core-catalog 0.6.0-pr-5 → 0.6.0-pr-7

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 (501) hide show
  1. package/components/shared/annex/AnnexWidget.svelte +15 -1
  2. package/components/shared/chronicle/ChronicleWidget.svelte +3 -0
  3. package/components/shared/messages/MessageBlocksView.svelte +294 -0
  4. package/components/shared/messages/MessageControls.svelte +173 -4
  5. package/components/shared/messages/MessageMediaStrip.svelte +41 -1
  6. package/components/shared/messages/MessagePartsView.svelte +8 -2
  7. package/components/shared/messages/MessageStateLedger.svelte +27 -39
  8. package/components/shared/messages/MessagesWidget.svelte +173 -15
  9. package/components/shared/messages/NextCharacterBlock.svelte +57 -6
  10. package/components/shared/messages/SceneDivider.svelte +104 -68
  11. package/components/shared/messages/SessionComposer.svelte +245 -157
  12. package/components/shared/messages/SessionContainer.svelte +212 -60
  13. package/components/shared/messages/SessionMessage.svelte +257 -26
  14. package/components/shared/messages/SpokenLine.svelte +273 -0
  15. package/components/shared/messages/StateProposalList.svelte +45 -0
  16. package/components/shared/messages/TurnLine.svelte +87 -84
  17. package/components/shared/messages/conversation.svelte.ts +223 -12
  18. package/components/shared/messages/interleave.ts +178 -0
  19. package/components/shared/messages/mediaStrip.ts +29 -5
  20. package/components/shared/messages/spokenLine.ts +177 -0
  21. package/components/shared/routine-log/RoutineLog.svelte +33 -0
  22. package/components/shared/routine-log/RoutineLogWidget.svelte +168 -0
  23. package/components/shared/routine-log/routine-log.ts +12 -0
  24. package/components/shared/routine-log/routineLog.ts +111 -0
  25. package/components/shared/scene-portraits/ScenePortraitsWidget.svelte +35 -2
  26. package/components/shared/state/ListEditor.svelte +128 -0
  27. package/components/shared/state/LorePicker.svelte +163 -0
  28. package/components/shared/state/PieceCard.svelte +257 -0
  29. package/components/shared/state/PieceForm.svelte +199 -0
  30. package/components/shared/state/PieceList.svelte +143 -0
  31. package/components/shared/state/SlotControl.svelte +297 -395
  32. package/components/shared/state/StoryTimeEditor.svelte +108 -0
  33. package/components/shared/state/slotWriter.svelte.ts +30 -20
  34. package/components/shared/stats/StatsWidget.svelte +774 -119
  35. package/dist/components/actions.js +7 -7
  36. package/dist/components/actions.source.json +1 -1
  37. package/dist/components/album.js +2 -4
  38. package/dist/components/album.source.json +1 -1
  39. package/dist/components/annex.js +81 -35
  40. package/dist/components/annex.source.json +1 -1
  41. package/dist/components/attendance.js +1 -1
  42. package/dist/components/attendance.source.json +1 -1
  43. package/dist/components/authors-note.js +5 -5
  44. package/dist/components/authors-note.source.json +1 -1
  45. package/dist/components/backdrop.js +7 -7
  46. package/dist/components/backdrop.source.json +1 -1
  47. package/dist/components/chronicle.js +94 -79
  48. package/dist/components/chronicle.source.json +1 -1
  49. package/dist/components/core-ui.json +1 -1
  50. package/dist/components/lore-entries.js +1 -1
  51. package/dist/components/lore-entries.source.json +1 -1
  52. package/dist/components/messages.js +4269 -2031
  53. package/dist/components/messages.source.json +1 -1
  54. package/dist/components/places.js +6 -4
  55. package/dist/components/places.source.json +1 -1
  56. package/dist/components/routine-log.js +382 -0
  57. package/dist/components/routine-log.source.json +1 -0
  58. package/dist/components/scene-portraits.js +316 -214
  59. package/dist/components/scene-portraits.source.json +1 -1
  60. package/dist/components/shared-4ME6NFDK.js +277 -0
  61. package/dist/components/shared-7VDIXYAL.js +106 -0
  62. package/dist/components/{shared-ITSLBJB5.js → shared-BBF64YGL.js} +24 -20
  63. package/dist/components/shared-BIWKZFUU.js +584 -0
  64. package/dist/components/{shared-XBPH6USH.js → shared-JPG5DQO7.js} +627 -7
  65. package/dist/components/{shared-NK7QSVMU.js → shared-QXF5CJVN.js} +39 -58
  66. package/dist/components/{shared-TDWKI2QV.js → shared-W3XS5FEL.js} +3 -2
  67. package/dist/components/shared-WV3QTKZT.js +402 -0
  68. package/dist/components/{shared-3K7SOGH7.js → shared-XBDUENRA.js} +1 -1
  69. package/dist/components/shared-YDS7HYL6.js +708 -0
  70. package/dist/components/stats.js +4224 -6
  71. package/dist/components/stats.source.json +1 -1
  72. package/dist/components/turn-order.js +12 -8
  73. package/dist/components/turn-order.source.json +1 -1
  74. package/dist/factories/answerForm.d.ts +1 -1
  75. package/dist/factories/answerForm.js +4 -7
  76. package/dist/factories/turnOrder.d.ts +41 -2
  77. package/dist/factories/turnOrder.js +67 -20
  78. package/dist/functions/asking.d.ts +10 -0
  79. package/dist/functions/asking.js +22 -0
  80. package/dist/functions/atZeroHealth.d.ts +60 -0
  81. package/dist/functions/atZeroHealth.js +155 -0
  82. package/dist/functions/body.d.ts +207 -0
  83. package/dist/functions/body.js +259 -0
  84. package/dist/functions/changing.d.ts +62 -0
  85. package/dist/functions/changing.js +332 -0
  86. package/dist/functions/deciding.d.ts +90 -0
  87. package/dist/functions/deciding.js +542 -0
  88. package/dist/functions/index.d.ts +55 -0
  89. package/dist/functions/index.js +39 -0
  90. package/dist/functions/outcomeMoves.d.ts +3 -0
  91. package/dist/functions/outcomeMoves.js +71 -0
  92. package/dist/functions/pieces.d.ts +46 -0
  93. package/dist/functions/pieces.js +191 -0
  94. package/dist/functions/progression.d.ts +31 -0
  95. package/dist/functions/progression.js +162 -0
  96. package/dist/functions/scopes.d.ts +27 -0
  97. package/dist/functions/scopes.js +111 -0
  98. package/dist/functions/time.d.ts +53 -0
  99. package/dist/functions/time.js +252 -0
  100. package/dist/functions/values.d.ts +59 -0
  101. package/dist/functions/values.js +216 -0
  102. package/dist/genres/chat/answerForm.d.ts +6 -4
  103. package/dist/genres/chat/answerForm.js +6 -4
  104. package/dist/genres/chat/create.d.ts +3 -3
  105. package/dist/genres/chat/create.js +28 -49
  106. package/dist/genres/chat/index.d.ts +5 -11
  107. package/dist/genres/chat/index.js +6 -12
  108. package/dist/genres/chat/memory.d.ts +36 -0
  109. package/dist/genres/chat/memory.js +117 -0
  110. package/dist/genres/chat/respond.d.ts +46 -17
  111. package/dist/genres/chat/respond.js +342 -1087
  112. package/dist/genres/chat/turnOrder.d.ts +7 -4
  113. package/dist/genres/chat/turnOrder.js +13 -12
  114. package/dist/genres/defaults.d.ts +456 -0
  115. package/dist/genres/defaults.js +366 -0
  116. package/dist/genres/dungeon-crawler/answerForm.d.ts +11 -0
  117. package/dist/genres/dungeon-crawler/answerForm.js +13 -0
  118. package/dist/genres/dungeon-crawler/calls.d.ts +32 -0
  119. package/dist/genres/dungeon-crawler/calls.js +77 -0
  120. package/dist/genres/dungeon-crawler/create.d.ts +71 -0
  121. package/dist/genres/dungeon-crawler/create.js +213 -0
  122. package/dist/genres/dungeon-crawler/death.d.ts +50 -0
  123. package/dist/genres/dungeon-crawler/death.js +168 -0
  124. package/dist/genres/dungeon-crawler/dice.d.ts +53 -0
  125. package/dist/genres/dungeon-crawler/dice.js +270 -0
  126. package/dist/genres/dungeon-crawler/fromRuleset.d.ts +147 -0
  127. package/dist/genres/dungeon-crawler/fromRuleset.js +162 -0
  128. package/dist/genres/dungeon-crawler/genesis.d.ts +38 -0
  129. package/dist/genres/dungeon-crawler/genesis.js +155 -0
  130. package/dist/genres/dungeon-crawler/goal.d.ts +76 -0
  131. package/dist/genres/dungeon-crawler/goal.js +321 -0
  132. package/dist/genres/dungeon-crawler/index.d.ts +59 -0
  133. package/dist/genres/dungeon-crawler/index.js +69 -0
  134. package/dist/genres/dungeon-crawler/interview.d.ts +874 -0
  135. package/dist/genres/dungeon-crawler/interview.js +404 -0
  136. package/dist/genres/dungeon-crawler/journal.d.ts +71 -0
  137. package/dist/genres/dungeon-crawler/journal.js +160 -0
  138. package/dist/genres/dungeon-crawler/kits.d.ts +153 -0
  139. package/dist/genres/dungeon-crawler/kits.js +228 -0
  140. package/dist/genres/dungeon-crawler/lore.d.ts +158 -0
  141. package/dist/genres/dungeon-crawler/lore.js +321 -0
  142. package/dist/genres/dungeon-crawler/names.d.ts +166 -0
  143. package/dist/genres/dungeon-crawler/names.js +160 -0
  144. package/dist/genres/dungeon-crawler/parley.d.ts +36 -0
  145. package/dist/genres/dungeon-crawler/parley.js +171 -0
  146. package/dist/genres/dungeon-crawler/preamble.d.ts +66 -0
  147. package/dist/genres/dungeon-crawler/preamble.js +648 -0
  148. package/dist/genres/dungeon-crawler/respond.d.ts +86 -0
  149. package/dist/genres/dungeon-crawler/respond.js +78 -0
  150. package/dist/genres/dungeon-crawler/rest.d.ts +82 -0
  151. package/dist/genres/dungeon-crawler/rest.js +287 -0
  152. package/dist/genres/dungeon-crawler/reveal.d.ts +38 -0
  153. package/dist/genres/dungeon-crawler/reveal.js +129 -0
  154. package/dist/genres/dungeon-crawler/round.d.ts +56 -0
  155. package/dist/genres/dungeon-crawler/round.js +45 -0
  156. package/dist/genres/dungeon-crawler/roundScript.d.ts +80 -0
  157. package/dist/genres/dungeon-crawler/roundScript.js +148 -0
  158. package/dist/genres/dungeon-crawler/scripts.d.ts +211 -0
  159. package/dist/genres/dungeon-crawler/scripts.js +946 -0
  160. package/dist/genres/dungeon-crawler/secrets.d.ts +63 -0
  161. package/dist/genres/dungeon-crawler/secrets.js +125 -0
  162. package/dist/genres/dungeon-crawler/shape.d.ts +257 -0
  163. package/dist/genres/dungeon-crawler/shape.js +268 -0
  164. package/dist/genres/dungeon-crawler/sheet.d.ts +504 -0
  165. package/dist/genres/dungeon-crawler/sheet.js +154 -0
  166. package/dist/genres/dungeon-crawler/story.d.ts +222 -0
  167. package/dist/genres/dungeon-crawler/story.js +1230 -0
  168. package/dist/genres/dungeon-crawler/storyScripts.d.ts +41 -0
  169. package/dist/genres/dungeon-crawler/storyScripts.js +158 -0
  170. package/dist/genres/dungeon-crawler/turnOrder.d.ts +31 -0
  171. package/dist/genres/dungeon-crawler/turnOrder.js +59 -0
  172. package/dist/genres/guide/answerForm.d.ts +1 -1
  173. package/dist/genres/guide/create.d.ts +1 -1
  174. package/dist/genres/guide/create.js +3 -6
  175. package/dist/genres/guide/respond.d.ts +1 -1
  176. package/dist/genres/guide/respond.js +45 -14
  177. package/dist/genres/guide/summarizeScene.d.ts +1 -1
  178. package/dist/genres/index.d.ts +7 -3
  179. package/dist/genres/index.js +28 -18
  180. package/dist/genres/lair/answerForm.d.ts +4 -4
  181. package/dist/genres/lair/answerForm.js +3 -3
  182. package/dist/genres/lair/buildRoom.d.ts +18 -49
  183. package/dist/genres/lair/buildRoom.js +183 -216
  184. package/dist/genres/lair/castellanAction.d.ts +1 -1
  185. package/dist/genres/lair/castellanAction.js +7 -8
  186. package/dist/genres/lair/create.d.ts +1 -1
  187. package/dist/genres/lair/create.js +3 -6
  188. package/dist/genres/lair/fileCurrentRoom.d.ts +7 -0
  189. package/dist/genres/lair/fileCurrentRoom.js +118 -0
  190. package/dist/genres/lair/fileRoom.d.ts +5 -3
  191. package/dist/genres/lair/fileRoom.js +236 -221
  192. package/dist/genres/lair/index.d.ts +39 -41
  193. package/dist/genres/lair/index.js +39 -42
  194. package/dist/genres/lair/keeper.d.ts +7 -0
  195. package/dist/genres/lair/keeper.js +52 -0
  196. package/dist/genres/lair/names.d.ts +112 -0
  197. package/dist/genres/lair/names.js +203 -0
  198. package/dist/genres/lair/nudge.d.ts +1 -1
  199. package/dist/genres/lair/nudge.js +3 -7
  200. package/dist/genres/lair/reply.d.ts +53 -0
  201. package/dist/genres/lair/reply.js +887 -0
  202. package/dist/genres/lair/reveal.d.ts +1 -1
  203. package/dist/genres/lair/roll.d.ts +24 -0
  204. package/dist/genres/lair/roll.js +85 -0
  205. package/dist/genres/lair/rollAnswer.d.ts +37 -0
  206. package/dist/genres/lair/rollAnswer.js +107 -0
  207. package/dist/genres/lair/roomAnswer.d.ts +7 -5
  208. package/dist/genres/lair/roomAnswer.js +318 -292
  209. package/dist/genres/lair/scratchpad.d.ts +7 -0
  210. package/dist/genres/lair/scratchpad.js +79 -0
  211. package/dist/genres/lair/scripts.d.ts +128 -0
  212. package/dist/genres/lair/scripts.js +439 -0
  213. package/dist/genres/lair/summarizeScene.d.ts +1 -22
  214. package/dist/genres/lair/summarizeScene.js +5 -16
  215. package/dist/genres/lair/trap.d.ts +1 -1
  216. package/dist/genres/lair/turnOrder.js +9 -1
  217. package/dist/genres/lair/welcome.d.ts +7 -0
  218. package/dist/genres/lair/welcome.js +38 -0
  219. package/dist/genres/lair/whisper.d.ts +1 -1
  220. package/dist/genres/lair/whisper.js +5 -8
  221. package/dist/genres/story/advanceTime.d.ts +7 -0
  222. package/dist/genres/story/advanceTime.js +17 -0
  223. package/dist/genres/story/afterRest.d.ts +7 -0
  224. package/dist/genres/story/afterRest.js +53 -0
  225. package/dist/genres/{adventure → story}/answer.d.ts +4 -4
  226. package/dist/genres/{adventure → story}/answer.js +7 -11
  227. package/dist/genres/story/answerForm.d.ts +9 -0
  228. package/dist/genres/story/answerForm.js +11 -0
  229. package/dist/genres/{adventure → story}/ask.d.ts +7 -7
  230. package/dist/genres/{adventure → story}/ask.js +14 -18
  231. package/dist/genres/story/create.d.ts +7 -0
  232. package/dist/genres/story/create.js +65 -0
  233. package/dist/genres/story/generateImage.d.ts +7 -0
  234. package/dist/genres/{chat → story}/generateImage.js +11 -17
  235. package/dist/genres/story/illustrateScene.d.ts +23 -0
  236. package/dist/genres/story/illustrateScene.js +38 -0
  237. package/dist/genres/story/index.d.ts +35 -0
  238. package/dist/genres/story/index.js +38 -0
  239. package/dist/genres/story/keeperAction.d.ts +144 -0
  240. package/dist/genres/story/keeperAction.js +301 -0
  241. package/dist/genres/{adventure → story}/look.d.ts +5 -5
  242. package/dist/genres/{adventure → story}/look.js +17 -17
  243. package/dist/genres/{chat → story}/narrate.d.ts +4 -4
  244. package/dist/genres/{chat → story}/narrate.js +30 -16
  245. package/dist/genres/{chat → story}/narrateCharacter.d.ts +3 -3
  246. package/dist/genres/{chat → story}/narrateCharacter.js +32 -17
  247. package/dist/genres/story/reckon.d.ts +265 -0
  248. package/dist/genres/story/reckon.js +433 -0
  249. package/dist/genres/story/reckoning.d.ts +8 -0
  250. package/dist/genres/story/reckoning.js +40 -0
  251. package/dist/genres/story/respond.d.ts +27 -0
  252. package/dist/genres/story/respond.js +1331 -0
  253. package/dist/genres/story/rest.d.ts +10 -0
  254. package/dist/genres/story/rest.js +16 -0
  255. package/dist/genres/story/summarizeScene.d.ts +7 -0
  256. package/dist/genres/story/summarizeScene.js +14 -0
  257. package/dist/genres/story/sweep.d.ts +70 -0
  258. package/dist/genres/story/sweep.js +58 -0
  259. package/dist/genres/story/turnOrder.d.ts +10 -0
  260. package/dist/genres/story/turnOrder.js +33 -0
  261. package/dist/genres/{chat → story}/ui/authors-note/index.d.ts +1 -1
  262. package/dist/index.d.ts +71 -9
  263. package/dist/index.js +194 -84
  264. package/dist/loadouts.d.ts +3 -1
  265. package/dist/loadouts.js +26 -1
  266. package/dist/primers/ninth-mile.d.ts +16 -0
  267. package/dist/primers/ninth-mile.js +68 -0
  268. package/dist/registry/entries.d.ts +47 -9
  269. package/dist/registry/entries.js +93 -31
  270. package/dist/registry/genres.d.ts +232 -49
  271. package/dist/registry/genres.js +858 -338
  272. package/dist/registry/hostState.d.ts +39 -0
  273. package/dist/registry/hostState.js +58 -0
  274. package/dist/registry/layouts.d.ts +118 -22
  275. package/dist/registry/layouts.js +234 -167
  276. package/dist/registry/primers.d.ts +10 -0
  277. package/dist/registry/primers.js +36 -0
  278. package/dist/registry/retired.d.ts +43 -0
  279. package/dist/registry/retired.js +81 -0
  280. package/dist/registry/rulesets.d.ts +1602 -0
  281. package/dist/registry/rulesets.js +271 -0
  282. package/dist/registry/slots.d.ts +590 -43
  283. package/dist/registry/slots.js +313 -80
  284. package/dist/registry/widgets.d.ts +3 -1
  285. package/dist/registry/widgets.js +347 -64
  286. package/dist/rulesets/archetypes/cardGame.d.ts +5 -0
  287. package/dist/rulesets/archetypes/cardGame.js +49 -0
  288. package/dist/rulesets/archetypes/functionIds.d.ts +48 -0
  289. package/dist/rulesets/archetypes/functionIds.js +35 -0
  290. package/dist/rulesets/archetypes/index.d.ts +16 -0
  291. package/dist/rulesets/archetypes/index.js +12 -0
  292. package/dist/rulesets/archetypes/romance.d.ts +5 -0
  293. package/dist/rulesets/archetypes/romance.js +54 -0
  294. package/dist/rulesets/archetypes/sliceOfLife.d.ts +5 -0
  295. package/dist/rulesets/archetypes/sliceOfLife.js +46 -0
  296. package/dist/rulesets/archetypes/workplace.d.ts +5 -0
  297. package/dist/rulesets/archetypes/workplace.js +52 -0
  298. package/dist/rulesets/rulesAction.d.ts +7 -0
  299. package/dist/rulesets/rulesAction.js +51 -0
  300. package/dist/rulesets/sections.d.ts +74 -0
  301. package/dist/rulesets/sections.js +137 -0
  302. package/dist/rulesets/templates/d20Style.d.ts +4 -0
  303. package/dist/rulesets/templates/d20Style.js +60 -0
  304. package/dist/rulesets/templates/dicePool.d.ts +4 -0
  305. package/dist/rulesets/templates/dicePool.js +58 -0
  306. package/dist/rulesets/templates/dicelessPools.d.ts +4 -0
  307. package/dist/rulesets/templates/dicelessPools.js +59 -0
  308. package/dist/rulesets/templates/index.d.ts +25 -0
  309. package/dist/rulesets/templates/index.js +17 -0
  310. package/dist/rulesets/templates/slots.d.ts +145 -0
  311. package/dist/rulesets/templates/slots.js +34 -0
  312. package/dist/rulesets/vis-itineris/compendium/LICENSE-CC-BY-4.0.md +3 -0
  313. package/dist/rulesets/vis-itineris/compendium/armour.json +108 -0
  314. package/dist/rulesets/vis-itineris/compendium/classes.json +401 -0
  315. package/dist/rulesets/vis-itineris/compendium/conditions.json +100 -0
  316. package/dist/rulesets/vis-itineris/compendium/consumables.json +85 -0
  317. package/dist/rulesets/vis-itineris/compendium/feats.json +71 -0
  318. package/dist/rulesets/vis-itineris/compendium/gear.json +138 -0
  319. package/dist/rulesets/vis-itineris/compendium/index.d.ts +31 -0
  320. package/dist/rulesets/vis-itineris/compendium/index.js +31 -0
  321. package/dist/rulesets/vis-itineris/compendium/spells.json +429 -0
  322. package/dist/rulesets/vis-itineris/compendium/weapons.json +331 -0
  323. package/dist/rulesets/vis-itineris/conventions.d.ts +92 -0
  324. package/dist/rulesets/vis-itineris/conventions.js +325 -0
  325. package/dist/rulesets/vis-itineris/index.d.ts +29 -0
  326. package/dist/rulesets/vis-itineris/index.js +27 -0
  327. package/dist/rulesets/vis-itineris/primer/calendar.json +71 -0
  328. package/dist/rulesets/vis-itineris/primer/cast.json +375 -0
  329. package/dist/rulesets/vis-itineris/primer/entries.json +154 -0
  330. package/dist/rulesets/vis-itineris/primer/index.d.ts +17 -0
  331. package/dist/rulesets/vis-itineris/primer/index.js +27 -0
  332. package/dist/rulesets/vis-itineris/primer/leads.json +54 -0
  333. package/dist/rulesets/vis-itineris/primer/places.json +347 -0
  334. package/dist/rulesets/vis-itineris/primer/relationships.json +54 -0
  335. package/dist/rulesets/vis-itineris/repertoires.d.ts +49 -0
  336. package/dist/rulesets/vis-itineris/repertoires.js +491 -0
  337. package/dist/rulesets/vis-itineris/rules.d.ts +62 -0
  338. package/dist/rulesets/vis-itineris/rules.js +67 -0
  339. package/dist/rulesets/vis-itineris/ruleset.d.ts +27 -0
  340. package/dist/rulesets/vis-itineris/ruleset.js +136 -0
  341. package/dist/rulesets/vis-itineris/slots.d.ts +637 -0
  342. package/dist/rulesets/vis-itineris/slots.js +263 -0
  343. package/dist/rulesets/wherewithal/index.d.ts +79 -0
  344. package/dist/rulesets/wherewithal/index.js +252 -0
  345. package/dist/rulesets/wherewithal/ruleset.d.ts +23 -0
  346. package/dist/rulesets/wherewithal/ruleset.js +75 -0
  347. package/dist/rulesets/wherewithal/slots.d.ts +73 -0
  348. package/dist/rulesets/wherewithal/slots.js +32 -0
  349. package/dist/seed/presets.d.ts +25 -14
  350. package/dist/seed/presets.js +233 -188
  351. package/dist/seed/prompts.d.ts +58 -0
  352. package/dist/seed/prompts.js +435 -241
  353. package/dist/seed/scripts.d.ts +5 -0
  354. package/dist/seed/scripts.js +63 -0
  355. package/dist/seed/speechTemplates.d.ts +106 -0
  356. package/dist/seed/speechTemplates.js +201 -0
  357. package/dist/seed/visItinerisScripts.d.ts +65 -0
  358. package/dist/seed/visItinerisScripts.js +241 -0
  359. package/dist/seed/wherewithalScripts.d.ts +26 -0
  360. package/dist/seed/wherewithalScripts.js +90 -0
  361. package/dist/shared/annexField.d.ts +11 -4
  362. package/dist/shared/annexField.js +160 -4
  363. package/dist/shared/builtins/branch.d.ts +1 -1
  364. package/dist/shared/builtins/builtIn.d.ts +1 -1
  365. package/dist/shared/builtins/delete.d.ts +1 -1
  366. package/dist/shared/builtins/edit.d.ts +1 -1
  367. package/dist/shared/builtins/hide.d.ts +1 -1
  368. package/dist/shared/builtins/swipe.d.ts +1 -1
  369. package/dist/shared/calls.d.ts +135 -0
  370. package/dist/shared/calls.js +187 -0
  371. package/dist/shared/chains.d.ts +112 -0
  372. package/dist/shared/chains.js +65 -0
  373. package/dist/shared/characterReachesOut.d.ts +14 -0
  374. package/dist/shared/characterReachesOut.js +66 -0
  375. package/dist/shared/deltas.d.ts +17 -0
  376. package/dist/shared/deltas.js +45 -0
  377. package/dist/shared/describeLikeness.d.ts +1 -1
  378. package/dist/shared/graphBuild.d.ts +1 -1
  379. package/dist/shared/graphBuild.js +4 -4
  380. package/dist/shared/illustrateScene.d.ts +14 -6
  381. package/dist/shared/illustrateScene.js +106 -104
  382. package/dist/shared/lore.d.ts +62 -0
  383. package/dist/shared/lore.js +56 -0
  384. package/dist/shared/portrait.d.ts +1 -1
  385. package/dist/shared/portrait.js +1 -3
  386. package/dist/shared/reckoning.d.ts +338 -0
  387. package/dist/shared/reckoning.js +677 -0
  388. package/dist/shared/saveMessage.d.ts +29 -0
  389. package/dist/shared/saveMessage.js +42 -0
  390. package/dist/shared/scriptSeed.d.ts +34 -0
  391. package/dist/shared/scriptSeed.js +43 -0
  392. package/dist/shared/speakMessage.d.ts +12 -0
  393. package/dist/shared/speakMessage.js +157 -0
  394. package/dist/shared/speechFields.d.ts +37 -0
  395. package/dist/shared/speechFields.js +83 -0
  396. package/dist/shared/spriteFill.d.ts +1 -1
  397. package/dist/shared/spriteFill.js +1 -3
  398. package/dist/shared/sprites.d.ts +3 -3
  399. package/dist/shared/sprites.js +5 -4
  400. package/dist/shared/summarize/character.d.ts +1 -1
  401. package/dist/shared/summarize/history.d.ts +1 -1
  402. package/dist/shared/summarize/scene.d.ts +1 -1
  403. package/dist/shared/summarize/sceneIds.d.ts +1 -3
  404. package/dist/shared/summarize/sceneIds.js +1 -3
  405. package/dist/shared/summarize/summarizeScene.d.ts +1 -1
  406. package/dist/shared/summarize/summarizeScene.js +40 -23
  407. package/dist/shared/summarize/summarizeSpec.d.ts +30 -1
  408. package/dist/shared/summarize/summarizeSpec.js +77 -27
  409. package/dist/shared/summarize/world.d.ts +1 -1
  410. package/dist/shared/timePasses.d.ts +8 -9
  411. package/dist/shared/timePasses.js +9 -13
  412. package/dist/shared/toolLoop.d.ts +1 -1
  413. package/dist/shared/toolLoop.js +13 -9
  414. package/dist/shared/ui/annex/index.d.ts +7 -0
  415. package/dist/shared/ui/annex/index.js +5 -1
  416. package/dist/shared/ui/backdrop/index.d.ts +2 -2
  417. package/dist/shared/ui/backdrop/index.js +3 -3
  418. package/dist/shared/ui/chronicle/index.d.ts +2 -0
  419. package/dist/shared/ui/chronicle/index.js +1 -0
  420. package/dist/shared/ui/conversation/channelLanes.d.ts +24 -0
  421. package/dist/shared/ui/conversation/channelLanes.js +58 -0
  422. package/dist/shared/ui/conversation/channelTabs.d.ts +34 -0
  423. package/dist/shared/ui/conversation/channelTabs.js +79 -0
  424. package/dist/shared/ui/conversation/composerTray.d.ts +2 -2
  425. package/dist/shared/ui/conversation/composerTray.js +35 -5
  426. package/dist/shared/ui/conversation/diceLine.d.ts +36 -0
  427. package/dist/shared/ui/conversation/diceLine.js +70 -0
  428. package/dist/shared/ui/conversation/formAnswer.d.ts +12 -2
  429. package/dist/shared/ui/conversation/formAnswer.js +14 -3
  430. package/dist/shared/ui/conversation/index.d.ts +6 -0
  431. package/dist/shared/ui/conversation/index.js +13 -0
  432. package/dist/shared/ui/conversation/itemValues.d.ts +6 -4
  433. package/dist/shared/ui/conversation/itemValues.js +5 -6
  434. package/dist/shared/ui/conversation/messageVerbState.d.ts +24 -2
  435. package/dist/shared/ui/conversation/messageVerbState.js +17 -7
  436. package/dist/shared/ui/conversation/rewindStrip.d.ts +59 -0
  437. package/dist/shared/ui/conversation/rewindStrip.js +33 -0
  438. package/dist/shared/ui/conversation/tableChannel.d.ts +12 -0
  439. package/dist/shared/ui/conversation/tableChannel.js +10 -0
  440. package/dist/shared/ui/scene-portraits/portraits.d.ts +51 -1
  441. package/dist/shared/ui/scene-portraits/portraits.js +41 -2
  442. package/dist/shared/ui/session-state/barMath.js +5 -2
  443. package/dist/shared/ui/session-state/index.d.ts +6 -4
  444. package/dist/shared/ui/session-state/index.js +6 -4
  445. package/dist/shared/ui/session-state/pieces.d.ts +153 -0
  446. package/dist/shared/ui/session-state/pieces.js +468 -0
  447. package/dist/shared/ui/session-state/shapes.d.ts +44 -2
  448. package/dist/shared/ui/session-state/shapes.js +77 -5
  449. package/dist/shared/ui/session-state/stateView.d.ts +227 -68
  450. package/dist/shared/ui/session-state/stateView.js +370 -45
  451. package/dist/shared/ui/session-state/timeFormat.d.ts +88 -0
  452. package/dist/shared/ui/session-state/timeFormat.js +144 -0
  453. package/dist/shared/ui/turn-order/index.js +20 -4
  454. package/dist/shared/ui/widgetContext.d.ts +2 -2
  455. package/dist/shared/weather.d.ts +16 -0
  456. package/dist/shared/weather.js +86 -0
  457. package/package.json +34 -11
  458. package/components/shared/world-state/WorldState.svelte +0 -33
  459. package/components/shared/world-state/world-state.ts +0 -10
  460. package/dist/components/shared-452PIS46.js +0 -156
  461. package/dist/components/shared-FTRGUE7G.js +0 -422
  462. package/dist/components/shared-GEDAMORM.js +0 -45
  463. package/dist/components/shared-GXTL5G2H.js +0 -209
  464. package/dist/components/shared-XISPHAKY.js +0 -1378
  465. package/dist/components/world-state.js +0 -38
  466. package/dist/components/world-state.source.json +0 -1
  467. package/dist/genres/adventure/advanceTime.d.ts +0 -18
  468. package/dist/genres/adventure/advanceTime.js +0 -24
  469. package/dist/genres/adventure/answerForm.d.ts +0 -9
  470. package/dist/genres/adventure/answerForm.js +0 -11
  471. package/dist/genres/adventure/create.d.ts +0 -36
  472. package/dist/genres/adventure/create.js +0 -62
  473. package/dist/genres/adventure/illustrateScene.d.ts +0 -7
  474. package/dist/genres/adventure/illustrateScene.js +0 -19
  475. package/dist/genres/adventure/index.d.ts +0 -45
  476. package/dist/genres/adventure/index.js +0 -45
  477. package/dist/genres/adventure/keeperAction.d.ts +0 -43
  478. package/dist/genres/adventure/keeperAction.js +0 -217
  479. package/dist/genres/adventure/respond.d.ts +0 -232
  480. package/dist/genres/adventure/respond.js +0 -1194
  481. package/dist/genres/adventure/rest.d.ts +0 -10
  482. package/dist/genres/adventure/rest.js +0 -16
  483. package/dist/genres/adventure/summarizeScene.d.ts +0 -7
  484. package/dist/genres/adventure/summarizeScene.js +0 -14
  485. package/dist/genres/adventure/turnOrder.d.ts +0 -10
  486. package/dist/genres/adventure/turnOrder.js +0 -27
  487. package/dist/genres/chat/advanceTime.d.ts +0 -7
  488. package/dist/genres/chat/advanceTime.js +0 -17
  489. package/dist/genres/chat/generateImage.d.ts +0 -7
  490. package/dist/genres/chat/illustrateScene.d.ts +0 -8
  491. package/dist/genres/chat/illustrateScene.js +0 -19
  492. package/dist/genres/chat/summarizeScene.d.ts +0 -7
  493. package/dist/genres/chat/summarizeScene.js +0 -14
  494. package/dist/genres/lair/advanceTime.d.ts +0 -7
  495. package/dist/genres/lair/advanceTime.js +0 -17
  496. package/dist/genres/lair/respond.d.ts +0 -310
  497. package/dist/genres/lair/respond.js +0 -1784
  498. /package/components/genres/{chat → story}/authors-note/AuthorsNote.svelte +0 -0
  499. /package/components/genres/{chat → story}/authors-note/AuthorsNoteWidget.svelte +0 -0
  500. /package/components/genres/{chat → story}/authors-note/authors-note.ts +0 -0
  501. /package/dist/genres/{chat → story}/ui/authors-note/index.js +0 -0
@@ -105,6 +105,10 @@
105
105
  body: string,
106
106
  items?: string[]
107
107
  )}
108
+ <!-- A fold is drawn only when there is something in it (polish parity L2,
109
+ STYLE-GUIDE §6.13): an empty reasoning part, or a section with no
110
+ text and no items, costs no row. -->
111
+ {#if body.trim() || items?.length}
108
112
  <div data-widget-part="messages.part-disclosure">
109
113
  <button
110
114
  type="button"
@@ -151,6 +155,7 @@
151
155
  </div>
152
156
  </div>
153
157
  </div>
158
+ {/if}
154
159
  {/snippet}
155
160
 
156
161
  {#each steps as step, i (step)}
@@ -193,8 +198,9 @@
193
198
  part.content ?? "",
194
199
  sectionItems(part)
195
200
  )}
196
- {:else if part.type === "core:image" || part.type === "core:file"}
197
- <!-- Attachments and generated images are the media strip's
201
+ {:else if part.type === "core:image" || part.type === "core:audio" || part.type === "core:video" || part.type === "core:file"}
202
+ <!-- Attachments, generated images and spoken replies (core:audio,
203
+ core:video since O5) are the media strip's
198
204
  (MessageMediaStrip, under the body in every state of the row),
199
205
  never drawn inline here — and never the unknown-type fold. -->
200
206
  {:else if Array.isArray((part.data as any)?.blocks)}
@@ -10,8 +10,9 @@
10
10
  *
11
11
  * Pending lines are the model's proposals waiting at the gate. They sit here
12
12
  * rather than in a queue somewhere else because the sentence that justifies a
13
- * change is the one above them; **Review** opens the same rows for the whole
14
- * session, for when they have scrolled away.
13
+ * change is the one above them. **Review** — the same rows for the whole
14
+ * session, for when they have scrolled away — is the turn line's alone
15
+ * (`TurnLine`), never repeated under each message.
15
16
  *
16
17
  * 🚧 `head` (live scenes §15 G13): the conversation's **ledger head**
17
18
  * instead — the clock moves made before the session had a single line
@@ -20,6 +21,8 @@
20
21
  */
21
22
  import StateProposalList from "./StateProposalList.svelte"
22
23
  import { useConversation } from "./conversation.svelte"
24
+ import { useWidgetContext } from "../context"
25
+ import { ledgerLineTextAs } from "@serene-pub/core-catalog/session-state"
23
26
 
24
27
  type Props = { messageId: number; head?: false } | { messageId?: undefined; head: true }
25
28
  let { messageId, head = false }: Props = $props()
@@ -33,8 +36,20 @@
33
36
  : (conv.dossier?.state.ledgers[messageId as number] ?? [])
34
37
  )
35
38
  let pending = $derived(head ? [] : (conv.dossier?.state.pending[messageId as number] ?? []))
36
- let waiting = $derived(head ? [] : (conv.dossier?.state.waiting ?? []))
37
- let reviewOpen = $state(false)
39
+ // 🚧 The copy's `timeFormat`: a story-time line (a clock move, a clock
40
+ // stat) spelled the copy's way from the parts the host sent beside its
41
+ // words (`storyTime`); empty, the host's words as they came.
42
+ const widget = useWidgetContext()
43
+ let timeFormat = $derived(
44
+ (widget?.current.settings.v1 as Record<string, unknown> | undefined)?.timeFormat as string | undefined
45
+ )
46
+ /**
47
+ * 🚧 Who changed it, in words (PLAN-dc-after-walk3 R3-5, the walk's
48
+ * polish: a change line's name read "changed by run:<uuid>"): a person's
49
+ * hand, or a run — never its id.
50
+ */
51
+ const changedBy = (updatedBy: string): string =>
52
+ updatedBy === "user" ? "Changed by hand" : updatedBy.startsWith("run:") ? "Changed automatically" : "Changed"
38
53
  </script>
39
54
 
40
55
  <!-- The ledger's parts (`messages.ledger*`, `messages.proposal*`; STYLE-GUIDE
@@ -47,11 +62,12 @@
47
62
  >
48
63
  {#each groups as group (group.ownerKey)}
49
64
  <p data-widget-part="messages.ledger-line" data-owner-key={group.ownerKey}>
50
- <span data-widget-part="messages.ledger-owner">{group.ownerLabel}</span>
65
+ <!-- 🚧 The world's lines carry no name (Q3-2): "Time Day 1, 08:00 → 08:05". -->
66
+ {#if group.ownerLabel}<span data-widget-part="messages.ledger-owner">{group.ownerLabel}</span>{/if}
51
67
  {#each group.lines as line, i (line.key)}
52
68
  {#if i > 0}<span data-widget-part="messages.ledger-separator">·</span>{/if}
53
- <span data-widget-part="messages.ledger-change" title="changed by {line.updatedBy}">
54
- {line.text}
69
+ <span data-widget-part="messages.ledger-change" title={changedBy(line.updatedBy)}>
70
+ {ledgerLineTextAs(line, timeFormat)}
55
71
  </span>
56
72
  {/each}
57
73
  </p>
@@ -61,37 +77,9 @@
61
77
  <StateProposalList proposals={pending} />
62
78
  {/if}
63
79
 
64
- {#if waiting.length}
65
- <!-- `sp-popover` (§3.5): our button is the trigger, the card the panel. -->
66
- <sp-popover
67
- placement="bottom-start"
68
- label="Waiting for you"
69
- open={reviewOpen}
70
- onopen-change={(e: CustomEvent<{ open: boolean }>) => (reviewOpen = e.detail.open)}
71
- >
72
- <button slot="trigger" type="button" data-widget-part="messages.ledger-review">
73
- <sp-icon name="clipboard-check" size="11"></sp-icon>
74
- <span>
75
- Review
76
- {waiting.length === 1
77
- ? "1 change"
78
- : `${waiting.length} changes`}
79
- </span>
80
- </button>
81
- <div data-widget-part="messages.ledger-review-panel">
82
- <header
83
- data-widget-part="messages.ledger-review-title"
84
- >
85
- <sp-icon name="clipboard-check" size="14"></sp-icon>
86
- <span>Waiting for you</span>
87
- </header>
88
- <p data-widget-part="messages.ledger-review-note">
89
- The AI asked for these. Nothing changes until
90
- you accept one.
91
- </p>
92
- <StateProposalList proposals={waiting} showAnchor />
93
- </div>
94
- </sp-popover>
95
- {/if}
80
+ <!-- 🚧 No session-wide Review here (DC walk 6: "Review 1 change" drawn
81
+ once per ledger AND on the turn line — three buttons for one
82
+ proposal). The turn line is the one place it lives; this
83
+ message's own proposals are the list above. -->
96
84
  </div>
97
85
  {/if}
@@ -14,12 +14,13 @@
14
14
  export type NextUp = "head" | "list" | "hidden"
15
15
 
16
16
  /**
17
- * How wide the log's rows and the composer run: the whole width the layout
18
- * gives the widget (`full`, the default), or a reading measure centred in
19
- * it (`comfortable`, about 640px of prose). Never a hidden cap: the widget
20
- * fills its box unless its settings say otherwise.
17
+ * How wide the log's rows and the composer run: a reading column of about
18
+ * 76 characters of the story's body text centred in the box (`column`,
19
+ * the default since ★R1, 2026-10-24), the whole width the layout gives
20
+ * the widget (`full`), or the narrower measure (`comfortable`, about
21
+ * 640px of prose). Never a hidden cap: a setting a person sees and changes.
21
22
  */
22
- export type LineWidth = "full" | "comfortable"
23
+ export type LineWidth = "column" | "full" | "comfortable"
23
24
 
24
25
  /**
25
26
  * How the lines are drawn (PLAN-core-widgets §3.7): `rows`, the log as
@@ -40,6 +41,11 @@
40
41
  export interface ConversationSettings {
41
42
  order: MessageOrder
42
43
  composerSkin: ComposerSkin
44
+ /**
45
+ * 🚧 The composer while a tab other than the first is shown
46
+ * (`otherTabsComposer`, lair fix 2), or `same` — `composerSkin`.
47
+ */
48
+ otherTabsComposer: ComposerSkin | "same"
43
49
  composerPosition: ComposerPosition
44
50
  lineWidth: LineWidth
45
51
  /**
@@ -61,6 +67,16 @@
61
67
  * by it; the widget draws its head from it.
62
68
  */
63
69
  channel: string | null
70
+ /**
71
+ * 🚧 What an empty log says (the copy's `emptyState`), or `null` for
72
+ * the widget's own "Send a message to start".
73
+ */
74
+ emptyState: string | null
75
+ /**
76
+ * 🚧 How the change lines spell a story time (`formatStoryTimeAs`
77
+ * tokens), or `null` for the host's spelling through the calendar.
78
+ */
79
+ timeFormat: string | null
64
80
  }
65
81
 
66
82
  /**
@@ -71,8 +87,9 @@
71
87
  export const CONVERSATION_DEFAULTS: ConversationSettings = {
72
88
  order: "oldest-first",
73
89
  composerSkin: "classic",
90
+ otherTabsComposer: "same",
74
91
  composerPosition: "bottom",
75
- lineWidth: "full",
92
+ lineWidth: "column",
76
93
  presentation: "rows",
77
94
  showMessages: true,
78
95
  showComposer: true,
@@ -81,7 +98,9 @@
81
98
  showSceneMarkers: true,
82
99
  nextUp: "head",
83
100
  showActions: true,
84
- channel: null
101
+ channel: null,
102
+ emptyState: null,
103
+ timeFormat: null
85
104
  }
86
105
 
87
106
  function pickEnum<T extends string>(
@@ -133,12 +152,17 @@
133
152
  return {
134
153
  order: pickEnum(v.order, ["oldest-first", "newest-first"], d.order),
135
154
  composerSkin: folio && skin === d.composerSkin ? "quill" : skin,
155
+ otherTabsComposer: pickEnum(
156
+ v.otherTabsComposer,
157
+ ["same", "classic", "minimal", "writer", "quill"],
158
+ d.otherTabsComposer
159
+ ),
136
160
  composerPosition: pickEnum(
137
161
  v.composerPosition,
138
162
  ["bottom", "top"],
139
163
  d.composerPosition
140
164
  ),
141
- lineWidth: pickEnum(v.lineWidth, ["full", "comfortable"], d.lineWidth),
165
+ lineWidth: pickEnum(v.lineWidth, ["column", "full", "comfortable"], d.lineWidth),
142
166
  presentation,
143
167
  showMessages: pickBool(v.showMessages, d.showMessages),
144
168
  showComposer: pickBool(v.showComposer, d.showComposer),
@@ -157,7 +181,15 @@
157
181
  channel:
158
182
  typeof v.channel === "string" && v.channel.trim()
159
183
  ? v.channel.trim()
160
- : d.channel
184
+ : d.channel,
185
+ emptyState:
186
+ typeof v.emptyState === "string" && v.emptyState.trim()
187
+ ? v.emptyState.trim()
188
+ : d.emptyState,
189
+ timeFormat:
190
+ typeof v.timeFormat === "string" && v.timeFormat.trim()
191
+ ? v.timeFormat
192
+ : d.timeFormat
161
193
  }
162
194
  }
163
195
  </script>
@@ -175,6 +207,9 @@
175
207
  * onto the root as data attributes, and decides which end the composer
176
208
  * sits at.
177
209
  */
210
+ import { untrack } from "svelte"
211
+ import { SvelteMap } from "svelte/reactivity"
212
+ import { channelTabDots, channelTabsOf, newestNewsOn, rewindStripState } from "@serene-pub/core-catalog/conversation"
178
213
  import { useWidgetContext } from "../context"
179
214
  import SessionContainer from "./SessionContainer.svelte"
180
215
  import SessionComposer from "./SessionComposer.svelte"
@@ -242,6 +277,78 @@
242
277
  )
243
278
  })
244
279
 
280
+ /**
281
+ * 🚧 **Channel tabs** (lair fix 2, 2026-10-22): a copy showing two or
282
+ * more channels — the Lair's story with its Sanctum, for the GM — draws a
283
+ * tab each above the log (`channelTabsOf`), in place of the composer's
284
+ * old channel switch. The active tab is the conversation's lane: the log
285
+ * shows its rows and the composer writes there. A guest is never told the
286
+ * Sanctum (an owner-only channel), so their story has no tabs. The tabs
287
+ * are the host's (`sp-tabs`): the page draws the tablist, its roving
288
+ * focus and its arrow keys (STYLE-GUIDE §10), and raises `change`.
289
+ */
290
+ // Never on a copy pinned to a channel: its claim is one channel, its head names it.
291
+ const tabs = $derived(conversation && !settings.channel ? channelTabsOf(conversation.channels) : [])
292
+ const activeTab = $derived(conversation?.lane.current ?? "main")
293
+ const viewerId = $derived.by((): number | null => {
294
+ const id = (ctx?.current.viewer?.v1 as { userId?: unknown } | undefined)?.userId
295
+ return typeof id === "number" ? id : null
296
+ })
297
+ /**
298
+ * What each tab was last shown with (its newest line by somebody else):
299
+ * the shown tab's mark follows its channel, a tab never seen starts with
300
+ * its history read. Written by the effect below, never read tracked there.
301
+ */
302
+ const seen = new SvelteMap<string, number>()
303
+ $effect(() => {
304
+ const rows = (conversation?.rows ?? []) as Parameters<typeof newestNewsOn>[0]
305
+ for (const tab of tabs) {
306
+ const newest = newestNewsOn(rows, tab, viewerId)
307
+ const active = tab === activeTab
308
+ untrack(() => {
309
+ if ((active || !seen.has(tab)) && seen.get(tab) !== newest) seen.set(tab, newest)
310
+ })
311
+ }
312
+ })
313
+ /** The tabs with a line nobody has shown the viewer yet. */
314
+ const dots = $derived(
315
+ channelTabDots(tabs, activeTab, (conversation?.rows ?? []) as Parameters<typeof newestNewsOn>[0], viewerId, seen)
316
+ )
317
+ /** A tab's name, said with its news to a screen reader (the trigger's own label). */
318
+ const tabLabel = (slug: string) =>
319
+ `${conversation?.channelName(slug) ?? slug}${dots.has(slug) ? " (new lines)" : ""}`
320
+ /**
321
+ * The composer this tab is written with: the copy's `composer`, or —
322
+ * on a tab other than the first — its `otherTabsComposer` when it says
323
+ * one (the Lair's Sanctum pill).
324
+ */
325
+ const composerSkin = $derived(
326
+ tabs.length > 1 && activeTab !== tabs[0] && settings.otherTabsComposer !== "same"
327
+ ? settings.otherTabsComposer
328
+ : settings.composerSkin
329
+ )
330
+
331
+ /**
332
+ * 🚧 **Back · Forward** (RF fix 5, owner ruling 2026-10-23): the composer's
333
+ * note while the session is rewound, on a copy that shows the story (the
334
+ * primary log, or one pinned to `main`), with Forward beside it for the
335
+ * owner. The host says how many turns are ahead and why a press would be
336
+ * refused (`dossier.rewind`); nothing presses while a reply is being
337
+ * written. The two presses themselves are the session header's (polish
338
+ * parity L1, 2026-10-24: chrome above the first message is at most two
339
+ * rows), which reads the same state through `rewindStripState`.
340
+ */
341
+ const generating = $derived(
342
+ ((conversation?.ctx.messages.v1 ?? []) as Array<{ isGenerating?: boolean }>).some((m) => m.isGenerating)
343
+ )
344
+ const rewind = $derived(
345
+ rewindStripState({
346
+ rewind: conversation?.rewind.state,
347
+ isOwner: !!conversation?.dossier?.isOwner,
348
+ generating,
349
+ story: !settings.channel || settings.channel === "main" || settings.channel.startsWith("main:")
350
+ })
351
+ )
245
352
  // Compared by value, the way `WidgetHost` compares its layout: the widget
246
353
  // context re-projects on every message that lands, and the settings on it
247
354
  // are the same object nearly every time.
@@ -262,7 +369,7 @@
262
369
  data-widget-part="messages.root"
263
370
  data-order={settings.order}
264
371
  data-composer-position={settings.composerPosition}
265
- data-composer-skin={settings.composerSkin}
372
+ data-composer-skin={composerSkin}
266
373
  data-line-width={settings.lineWidth}
267
374
  data-presentation={settings.presentation}
268
375
  data-show-messages={settings.showMessages}
@@ -280,11 +387,40 @@
280
387
  <h2 data-widget-part="messages.channel-title">{conversation.channelName(settings.channel)}</h2>
281
388
  </header>
282
389
  {/if}
390
+ {#if tabs.length > 1 && conversation}
391
+ <!-- 🚧 The channel tabs (lair fix 2): one per channel this copy shows,
392
+ the active one the lane the log shows and the composer writes on.
393
+ A tab not shown carries a dot when somebody else's line lands on
394
+ its channel. -->
395
+ <sp-tabs
396
+ value={activeTab}
397
+ label="Conversations"
398
+ data-widget-part="messages.channel-tabs"
399
+ onchange={(e: CustomEvent<{ value: string }>) => {
400
+ if (e.target === e.currentTarget && e.detail?.value) conversation.lane.set(e.detail.value)
401
+ }}
402
+ >
403
+ <!-- One block per tab: an sp element seats each tab's content in its
404
+ own trigger (see MessageComposer's tabs). -->
405
+ {#each tabs as slug (slug)}
406
+ <sp-tab
407
+ value={slug}
408
+ label={tabLabel(slug)}
409
+ data-widget-part="messages.channel-tab"
410
+ data-channel-tab={slug}
411
+ data-news={dots.has(slug) ? "" : undefined}
412
+ >
413
+ <span data-widget-part="messages.channel-tab-label">{conversation.channelName(slug)}</span>
414
+ {#if dots.has(slug)}<span data-widget-part="messages.channel-tab-dot" aria-hidden="true"></span>{/if}
415
+ </sp-tab>
416
+ {/each}
417
+ </sp-tabs>
418
+ {/if}
283
419
  <!-- The whole panel scrolls: the log spans the widget's width, so its
284
420
  scrollbar sits at the panel's edge and the wheel works anywhere in it;
285
- the rows (the stage, `messages.stage`) and the composer take the
286
- widget's full width, or a centred reading measure when the Line width
287
- setting says Comfortable. DOM order is log then composer whichever end the
421
+ the rows (the stage, `messages.stage`) and the composer take a centred
422
+ reading measure when the Line width setting says Column (the default)
423
+ or Comfortable, or the widget's full width at Full. DOM order is log then composer whichever end the
288
424
  composer is drawn at: the reading order a screen reader and the tab
289
425
  sequence follow is the conversation's, and `order` moves the box on
290
426
  screen. -->
@@ -295,6 +431,7 @@
295
431
  order={settings.order}
296
432
  showSceneMarkers={settings.showSceneMarkers}
297
433
  presentation={settings.presentation}
434
+ emptyState={settings.emptyState}
298
435
  />
299
436
  {/if}
300
437
  </div>
@@ -407,7 +544,7 @@
407
544
  </div>
408
545
  </div>
409
546
  </div>
410
- {:else if settings.showComposer && conversation}
547
+ {:else if settings.showComposer && conversation && !conversation.noLane}
411
548
  {@const dossier = conversation.dossier}
412
549
  <div data-widget-part="messages.compose">
413
550
  <!-- The turn line (§3.16): what the last run did, and who is next —
@@ -430,7 +567,28 @@
430
567
  </div>
431
568
  </div>
432
569
  {:else}
433
- <SessionComposer composerSkin={settings.composerSkin} showActions={settings.showActions} />
570
+ {#if rewind.replaceText}
571
+ <!-- 🚧 While rewound (RF fix 5): a new line replaces the
572
+ turns ahead — said before it is written, with Forward
573
+ beside it for the owner. -->
574
+ <p data-widget-part="messages.rewind-replace" role="status">
575
+ <sp-icon name="undo-2" size="14" data-widget-part="messages.rewind-replace-icon"></sp-icon>
576
+ <span data-widget-part="messages.rewind-replace-text">{rewind.replaceText}</span>
577
+ {#if conversation.dossier?.isOwner}
578
+ <button
579
+ type="button"
580
+ data-widget-part="messages.rewind-replace-forward"
581
+ title={rewind.forward.reason ? `Forward — ${rewind.forward.reason}` : "Forward — bring the next turn back"}
582
+ aria-disabled={rewind.forward.disabled}
583
+ onclick={(e) => (rewind.forward.disabled ? e.preventDefault() : conversation.rewind.forward())}
584
+ >
585
+ <span>Forward</span>
586
+ <sp-icon name="redo-2" size="14"></sp-icon>
587
+ </button>
588
+ {/if}
589
+ </p>
590
+ {/if}
591
+ <SessionComposer {composerSkin} showActions={settings.showActions} />
434
592
  {/if}
435
593
  </div>
436
594
  </div>
@@ -16,13 +16,22 @@
16
16
  *
17
17
  * An empty order with people to choose from — a round that is over, or
18
18
  * a manual strategy waiting to be told — waits on a message and offers
19
- * the pick. An order whose entries are all on other channels shows
19
+ * the pick. 🚧 A round that waits on others once the viewer has had their
20
+ * say (`waitingFor`, the page's reading) says so: "Waiting for Maren Holt". An order whose entries are all on other channels shows
20
21
  * nothing here.
21
22
  *
22
23
  * Continue hands its channel to `onContinue`, so the page fires this
23
24
  * channel's entry. "Someone else" asks the page to open the turn picker.
24
25
  * With `mode: 'list'` the entries after the head follow as one quiet line.
25
26
  *
27
+ * 🚧 **Continue moves past a waiting player** (Lair rewrite D5,
28
+ * 2026-10-21): a planned turn a person plays (`via: 'plan'`, a seated
29
+ * player's delver) at the head waits for them — "Waiting for Maren".
30
+ * The session's owner alone gets Continue there too, with the sentence
31
+ * that says what it does: it moves past them (the server skips the seat,
32
+ * `skipWaitingTurn`) and the next planned turn takes its place. Anyone
33
+ * else waits; the player writes.
34
+ *
26
35
  * It draws the turn line's right half (`TurnLine`, PLAN-core-widgets
27
36
  * §3.16). Its parts are `messages.turn-line-*` (STYLE-GUIDE §6.16), each
28
37
  * beside its old name `messages.next-up-*`, ⏳ kept one release so a
@@ -55,6 +64,10 @@
55
64
  canChooseSomeoneElse?: boolean
56
65
  /** The person looking: their own persona's turn reads "Your turn". */
57
66
  viewerUserId?: number | null
67
+ /** 🚧 Whom the round waits on (Q3-3): "Waiting for Maren Holt". */
68
+ waitingFor?: readonly string[]
69
+ /** 🚧 The viewer owns the session: their Continue moves past a waiting player (D5). */
70
+ viewerIsOwner?: boolean
58
71
  }
59
72
 
60
73
  let {
@@ -66,8 +79,13 @@
66
79
  onContinue,
67
80
  onSomeoneElse,
68
81
  canChooseSomeoneElse = true,
69
- viewerUserId = null
82
+ viewerUserId = null,
83
+ waitingFor = [],
84
+ viewerIsOwner = false
70
85
  }: Props = $props()
86
+ const waitingWords = $derived(
87
+ waitingFor.length ? `Waiting for ${new Intl.ListFormat("en", { style: "long", type: "conjunction" }).format([...waitingFor])}` : ""
88
+ )
71
89
 
72
90
  const conversation = useConversation()
73
91
  /** This log's channel — the composer's — `main` by default. */
@@ -93,18 +111,33 @@
93
111
  viewerUserId != null &&
94
112
  byRef.get(head!.ref as string)?.ownerUserId === viewerUserId
95
113
  )
114
+ /**
115
+ * 🚧 The head is a planned turn somebody else plays (a seated player's
116
+ * delver, D5): the turn waits for them.
117
+ */
118
+ const headWaits = $derived(headIsPerson && !headIsMine && head?.via === "plan")
119
+ /** 🚧 …and the owner may move past them: Continue skips the seat. */
120
+ const ownerSkips = $derived(headWaits && viewerIsOwner)
96
121
  const line = $derived(
97
122
  headIsMine
98
123
  ? "Your turn"
99
- : headIsPerson
100
- ? `${headName}'s turn`
101
- : `${headName} is ready to continue`
124
+ : headWaits
125
+ ? `Waiting for ${headName}`
126
+ : headIsPerson
127
+ ? `${headName}'s turn`
128
+ : `${headName} is ready to continue`
102
129
  )
103
130
  const face = $derived(head?.ref ? avatarFor?.(head.ref) : undefined)
104
131
  const after = $derived(mode === "list" ? here.slice(1) : [])
105
132
  </script>
106
133
 
107
- {#if shouldShow && !order.length && candidates.length}
134
+ {#if !here.length && waitingWords}
135
+ <!-- 🚧 The round waits on others, the viewer's say made (Q3-3). -->
136
+ <div data-widget-part="messages.turn-line-waiting messages.next-up-waiting" data-waiting-for="">
137
+ <sp-icon name="hourglass" size="14"></sp-icon>
138
+ <span data-widget-part="messages.turn-line-text messages.next-up-text">{waitingWords}</span>
139
+ </div>
140
+ {:else if shouldShow && !order.length && candidates.length}
108
141
  <div data-widget-part="messages.turn-line-waiting messages.next-up-waiting">
109
142
  <span data-widget-part="messages.turn-line-text messages.next-up-text">
110
143
  Waiting for a message — or pick who speaks next
@@ -150,9 +183,27 @@
150
183
  <sp-icon name="play"></sp-icon>
151
184
  <span>Continue</span>
152
185
  </button>
186
+ {:else if ownerSkips}
187
+ <!-- 🚧 D5: the owner's Continue moves past the waiting player. -->
188
+ <button
189
+ type="button"
190
+ data-widget-part="messages.turn-line-continue messages.next-up-continue"
191
+ data-skips=""
192
+ onclick={() => onContinue(channel)}
193
+ title="Move past {headName}: the next turn goes ahead without them"
194
+ aria-label="Continue without {headName}"
195
+ >
196
+ <sp-icon name="skip-forward"></sp-icon>
197
+ <span>Continue</span>
198
+ </button>
153
199
  {/if}
154
200
  </div>
155
201
  </div>
202
+ {#if ownerSkips}
203
+ <p data-widget-part="messages.turn-line-skip">
204
+ Continue moves past {headName}: their turn is skipped this round.
205
+ </p>
206
+ {/if}
156
207
  {#if after.length}
157
208
  <p data-widget-part="messages.turn-line-after messages.next-up-after">
158
209
  Then {after.map((e) => nameOf(e.ref)).join(", ")}