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

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 (360) hide show
  1. package/README.md +21 -1
  2. package/components/{sessions → genres/chat}/authors-note/AuthorsNote.svelte +1 -1
  3. package/components/{sessions → genres/chat}/authors-note/AuthorsNoteWidget.svelte +1 -1
  4. package/components/{sessions/world-state/WorldState.svelte → shared/actions/Actions.svelte} +5 -5
  5. package/components/shared/actions/ActionsWidget.svelte +118 -0
  6. package/components/shared/actions/actions.ts +11 -0
  7. package/components/shared/album/Album.svelte +24 -0
  8. package/components/shared/album/AlbumWidget.svelte +163 -0
  9. package/components/shared/album/album.ts +10 -0
  10. package/components/shared/annex/Annex.svelte +24 -0
  11. package/components/shared/annex/AnnexWidget.svelte +151 -0
  12. package/components/shared/annex/annex.ts +10 -0
  13. package/components/shared/attendance/Attendance.svelte +24 -0
  14. package/components/shared/attendance/AttendanceWidget.svelte +136 -0
  15. package/components/shared/attendance/attendance.ts +12 -0
  16. package/components/shared/backdrop/Backdrop.svelte +24 -0
  17. package/components/shared/backdrop/BackdropWidget.svelte +345 -0
  18. package/components/shared/backdrop/backdrop.ts +10 -0
  19. package/components/shared/chronicle/Chronicle.svelte +36 -0
  20. package/components/shared/chronicle/ChronicleWidget.svelte +569 -0
  21. package/components/shared/chronicle/chronicle.ts +11 -0
  22. package/components/{sessions → shared}/lore-entries/LoreEntries.svelte +1 -1
  23. package/components/{sessions → shared}/lore-entries/LoreEntriesWidget.svelte +3 -3
  24. package/components/shared/map-canvas/MapCanvas.svelte +171 -0
  25. package/components/shared/map-canvas/index.ts +390 -0
  26. package/components/{sessions → shared}/messages/MessageComposer.svelte +1 -1
  27. package/components/{sessions → shared}/messages/MessageControls.svelte +42 -0
  28. package/components/{sessions → shared}/messages/MessageStateLedger.svelte +19 -8
  29. package/components/{sessions → shared}/messages/Messages.svelte +1 -1
  30. package/components/{sessions → shared}/messages/MessagesWidget.svelte +126 -40
  31. package/components/{sessions → shared}/messages/NextCharacterBlock.svelte +17 -14
  32. package/components/shared/messages/SceneCueChip.svelte +82 -0
  33. package/components/shared/messages/SceneDivider.svelte +399 -0
  34. package/components/{sessions → shared}/messages/SessionComposer.svelte +33 -9
  35. package/components/shared/messages/SessionContainer.svelte +651 -0
  36. package/components/{sessions → shared}/messages/SessionMessage.svelte +52 -7
  37. package/components/shared/messages/TurnLine.svelte +254 -0
  38. package/components/{sessions → shared}/messages/conversation.svelte.ts +191 -2
  39. package/components/shared/messages/sceneMarks.ts +397 -0
  40. package/components/shared/places/Places.svelte +24 -0
  41. package/components/shared/places/PlacesWidget.svelte +290 -0
  42. package/components/shared/places/places.ts +11 -0
  43. package/components/{sessions → shared}/scene-portraits/ScenePortraits.svelte +1 -1
  44. package/components/shared/scene-portraits/ScenePortraitsWidget.svelte +404 -0
  45. package/components/{sessions → shared}/state/SlotControl.svelte +9 -1
  46. package/components/{sessions → shared}/stats/Stats.svelte +1 -1
  47. package/components/shared/stats/StatsWidget.svelte +350 -0
  48. package/components/{sessions → shared}/stats/stats.ts +3 -2
  49. package/components/shared/turn-order/TurnOrder.svelte +24 -0
  50. package/components/shared/turn-order/TurnOrderWidget.svelte +167 -0
  51. package/components/shared/turn-order/turn-order.ts +11 -0
  52. package/components/{sessions/shared → shared}/widgetRef.svelte.ts +9 -2
  53. package/components/shared/world-state/WorldState.svelte +33 -0
  54. package/components/shared/world-state/world-state.ts +10 -0
  55. package/components/tsconfig.json +2 -2
  56. package/dist/components/actions.js +294 -0
  57. package/dist/components/actions.source.json +1 -0
  58. package/dist/components/album.js +386 -0
  59. package/dist/components/album.source.json +1 -0
  60. package/dist/components/annex.js +457 -0
  61. package/dist/components/annex.source.json +1 -0
  62. package/dist/components/attendance.js +353 -0
  63. package/dist/components/attendance.source.json +1 -0
  64. package/dist/components/authors-note.js +5 -5
  65. package/dist/components/authors-note.source.json +1 -1
  66. package/dist/components/backdrop.js +561 -0
  67. package/dist/components/backdrop.source.json +1 -0
  68. package/dist/components/chronicle.js +1141 -0
  69. package/dist/components/chronicle.source.json +1 -0
  70. package/dist/components/core-ui.json +1 -1
  71. package/dist/components/lore-entries.js +5 -5
  72. package/dist/components/lore-entries.source.json +1 -1
  73. package/dist/components/messages.js +3014 -2489
  74. package/dist/components/messages.source.json +1 -1
  75. package/dist/components/places.js +1133 -0
  76. package/dist/components/places.source.json +1 -0
  77. package/dist/components/scene-portraits.js +514 -345
  78. package/dist/components/scene-portraits.source.json +1 -1
  79. package/dist/components/shared-3K7SOGH7.js +16 -0
  80. package/dist/components/shared-452PIS46.js +156 -0
  81. package/dist/components/shared-GEDAMORM.js +45 -0
  82. package/dist/components/{shared-TCQZXBE3.js → shared-GXTL5G2H.js} +4 -3
  83. package/dist/components/shared-ITSLBJB5.js +478 -0
  84. package/dist/components/shared-NK7QSVMU.js +400 -0
  85. package/dist/components/shared-TDWKI2QV.js +58 -0
  86. package/dist/components/{shared-UAQVMZZK.js → shared-XBPH6USH.js} +586 -18
  87. package/dist/components/{shared-AINANAIA.js → shared-XISPHAKY.js} +502 -98
  88. package/dist/components/stats.js +8 -208
  89. package/dist/components/stats.source.json +1 -1
  90. package/dist/components/turn-order.js +461 -0
  91. package/dist/components/turn-order.source.json +1 -0
  92. package/dist/components/world-state.js +14 -202
  93. package/dist/components/world-state.source.json +1 -1
  94. package/dist/{answerForm.d.ts → factories/answerForm.d.ts} +4 -30
  95. package/dist/{answerForm.js → factories/answerForm.js} +10 -39
  96. package/dist/factories/once.d.ts +7 -0
  97. package/dist/factories/once.js +9 -0
  98. package/dist/{turnOrder.d.ts → factories/turnOrder.d.ts} +0 -22
  99. package/dist/{turnOrder.js → factories/turnOrder.js} +4 -104
  100. package/dist/genres/adventure/advanceTime.d.ts +18 -0
  101. package/dist/genres/adventure/advanceTime.js +24 -0
  102. package/dist/genres/adventure/answer.d.ts +23 -0
  103. package/dist/genres/adventure/answer.js +59 -0
  104. package/dist/genres/adventure/answerForm.d.ts +9 -0
  105. package/dist/genres/adventure/answerForm.js +11 -0
  106. package/dist/genres/adventure/ask.d.ts +73 -0
  107. package/dist/genres/adventure/ask.js +157 -0
  108. package/dist/genres/adventure/create.d.ts +36 -0
  109. package/dist/genres/adventure/create.js +62 -0
  110. package/dist/genres/adventure/illustrateScene.d.ts +7 -0
  111. package/dist/genres/adventure/illustrateScene.js +19 -0
  112. package/dist/genres/adventure/index.d.ts +45 -0
  113. package/dist/genres/adventure/index.js +45 -0
  114. package/dist/genres/adventure/keeperAction.d.ts +43 -0
  115. package/dist/genres/adventure/keeperAction.js +217 -0
  116. package/dist/genres/adventure/look.d.ts +45 -0
  117. package/dist/genres/adventure/look.js +209 -0
  118. package/dist/{adventure.d.ts → genres/adventure/respond.d.ts} +74 -65
  119. package/dist/{adventure.js → genres/adventure/respond.js} +125 -65
  120. package/dist/genres/adventure/rest.d.ts +10 -0
  121. package/dist/genres/adventure/rest.js +16 -0
  122. package/dist/genres/adventure/summarizeScene.d.ts +7 -0
  123. package/dist/genres/adventure/summarizeScene.js +14 -0
  124. package/dist/genres/adventure/turnOrder.d.ts +10 -0
  125. package/dist/genres/adventure/turnOrder.js +27 -0
  126. package/dist/genres/chat/advanceTime.d.ts +7 -0
  127. package/dist/genres/chat/advanceTime.js +17 -0
  128. package/dist/genres/chat/answerForm.d.ts +9 -0
  129. package/dist/genres/chat/answerForm.js +11 -0
  130. package/dist/genres/chat/create.d.ts +7 -0
  131. package/dist/{createChat.js → genres/chat/create.js} +6 -6
  132. package/dist/genres/chat/generateImage.d.ts +7 -0
  133. package/dist/{generateImage.js → genres/chat/generateImage.js} +26 -22
  134. package/dist/genres/chat/illustrateScene.d.ts +8 -0
  135. package/dist/genres/chat/illustrateScene.js +19 -0
  136. package/dist/genres/chat/index.d.ts +18 -0
  137. package/dist/genres/chat/index.js +19 -0
  138. package/dist/{narrate.d.ts → genres/chat/narrate.d.ts} +3 -3
  139. package/dist/{narrate.js → genres/chat/narrate.js} +37 -12
  140. package/dist/{narrateCharacter.d.ts → genres/chat/narrateCharacter.d.ts} +2 -2
  141. package/dist/{narrateCharacter.js → genres/chat/narrateCharacter.js} +39 -17
  142. package/dist/genres/chat/respond.d.ts +25 -0
  143. package/dist/{respond.js → genres/chat/respond.js} +91 -23
  144. package/dist/genres/chat/summarizeScene.d.ts +7 -0
  145. package/dist/genres/chat/summarizeScene.js +14 -0
  146. package/dist/genres/chat/turnOrder.d.ts +9 -0
  147. package/dist/genres/chat/turnOrder.js +28 -0
  148. package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.d.ts +1 -1
  149. package/dist/genres/guide/answerForm.d.ts +9 -0
  150. package/dist/genres/guide/answerForm.js +11 -0
  151. package/dist/genres/guide/create.d.ts +24 -0
  152. package/dist/genres/guide/create.js +58 -0
  153. package/dist/genres/guide/index.d.ts +10 -0
  154. package/dist/genres/guide/index.js +10 -0
  155. package/dist/{guide.d.ts → genres/guide/respond.d.ts} +1 -20
  156. package/dist/{guide.js → genres/guide/respond.js} +32 -61
  157. package/dist/genres/guide/summarizeScene.d.ts +7 -0
  158. package/dist/genres/guide/summarizeScene.js +14 -0
  159. package/dist/genres/guide/turnOrder.d.ts +10 -0
  160. package/dist/genres/guide/turnOrder.js +27 -0
  161. package/dist/genres/index.d.ts +14 -0
  162. package/dist/genres/index.js +41 -0
  163. package/dist/genres/lair/advanceTime.d.ts +7 -0
  164. package/dist/genres/lair/advanceTime.js +17 -0
  165. package/dist/genres/lair/answerForm.d.ts +17 -0
  166. package/dist/genres/lair/answerForm.js +19 -0
  167. package/dist/genres/lair/buildRoom.d.ts +64 -0
  168. package/dist/genres/lair/buildRoom.js +244 -0
  169. package/dist/genres/lair/castellanAction.d.ts +27 -0
  170. package/dist/genres/lair/castellanAction.js +177 -0
  171. package/dist/genres/lair/create.d.ts +28 -0
  172. package/dist/genres/lair/create.js +69 -0
  173. package/dist/genres/lair/fileRoom.d.ts +53 -0
  174. package/dist/genres/lair/fileRoom.js +288 -0
  175. package/dist/genres/lair/index.d.ts +62 -0
  176. package/dist/genres/lair/index.js +63 -0
  177. package/dist/genres/lair/nudge.d.ts +25 -0
  178. package/dist/genres/lair/nudge.js +78 -0
  179. package/dist/{lair.d.ts → genres/lair/respond.d.ts} +46 -59
  180. package/dist/{lair.js → genres/lair/respond.js} +55 -76
  181. package/dist/genres/lair/reveal.d.ts +10 -0
  182. package/dist/genres/lair/reveal.js +18 -0
  183. package/dist/genres/lair/roomAnswer.d.ts +86 -0
  184. package/dist/genres/lair/roomAnswer.js +378 -0
  185. package/dist/genres/lair/summarizeScene.d.ts +39 -0
  186. package/dist/genres/lair/summarizeScene.js +51 -0
  187. package/dist/genres/lair/trap.d.ts +11 -0
  188. package/dist/genres/lair/trap.js +24 -0
  189. package/dist/genres/lair/turnOrder.d.ts +9 -0
  190. package/dist/genres/lair/turnOrder.js +36 -0
  191. package/dist/genres/lair/whisper.d.ts +35 -0
  192. package/dist/genres/lair/whisper.js +90 -0
  193. package/dist/index.d.ts +52 -29
  194. package/dist/index.js +192 -86
  195. package/dist/loadouts.d.ts +37 -0
  196. package/dist/loadouts.js +105 -0
  197. package/dist/{entries.d.ts → registry/entries.d.ts} +1 -1
  198. package/dist/{genres.js → registry/genres.js} +40 -6
  199. package/dist/{ui/sessions → registry}/layouts.d.ts +41 -27
  200. package/dist/{ui/sessions → registry}/layouts.js +90 -49
  201. package/dist/{ui/sessions → registry}/widgets.d.ts +22 -0
  202. package/dist/registry/widgets.js +1294 -0
  203. package/dist/{presets.js → seed/presets.js} +28 -13
  204. package/dist/{prompts.d.ts → seed/prompts.d.ts} +10 -5
  205. package/dist/{prompts.js → seed/prompts.js} +225 -176
  206. package/dist/{annexField.d.ts → shared/annexField.d.ts} +12 -8
  207. package/dist/{annexField.js → shared/annexField.js} +16 -15
  208. package/dist/shared/builtins/branch.d.ts +8 -0
  209. package/dist/shared/builtins/branch.js +13 -0
  210. package/dist/{builtins.d.ts → shared/builtins/builtIn.d.ts} +16 -21
  211. package/dist/{builtins.js → shared/builtins/builtIn.js} +3 -37
  212. package/dist/shared/builtins/delete.d.ts +8 -0
  213. package/dist/shared/builtins/delete.js +13 -0
  214. package/dist/shared/builtins/edit.d.ts +8 -0
  215. package/dist/shared/builtins/edit.js +13 -0
  216. package/dist/shared/builtins/hide.d.ts +8 -0
  217. package/dist/shared/builtins/hide.js +13 -0
  218. package/dist/shared/builtins/index.d.ts +11 -0
  219. package/dist/shared/builtins/index.js +11 -0
  220. package/dist/shared/builtins/swipe.d.ts +8 -0
  221. package/dist/shared/builtins/swipe.js +17 -0
  222. package/dist/shared/describeLikeness.d.ts +14 -0
  223. package/dist/shared/describeLikeness.js +65 -0
  224. package/dist/shared/illustrateScene.d.ts +28 -0
  225. package/dist/shared/illustrateScene.js +181 -0
  226. package/dist/shared/portrait.d.ts +21 -0
  227. package/dist/shared/portrait.js +101 -0
  228. package/dist/shared/spriteFill.d.ts +14 -0
  229. package/dist/shared/spriteFill.js +107 -0
  230. package/dist/shared/sprites.d.ts +34 -0
  231. package/dist/shared/sprites.js +98 -0
  232. package/dist/shared/summarize/character.d.ts +9 -0
  233. package/dist/shared/summarize/character.js +10 -0
  234. package/dist/shared/summarize/history.d.ts +9 -0
  235. package/dist/shared/summarize/history.js +10 -0
  236. package/dist/shared/summarize/index.d.ts +12 -0
  237. package/dist/shared/summarize/index.js +12 -0
  238. package/dist/shared/summarize/scene.d.ts +38 -0
  239. package/dist/shared/summarize/scene.js +42 -0
  240. package/dist/shared/summarize/sceneIds.d.ts +17 -0
  241. package/dist/shared/summarize/sceneIds.js +17 -0
  242. package/dist/shared/summarize/summarizeScene.d.ts +113 -0
  243. package/dist/shared/summarize/summarizeScene.js +234 -0
  244. package/dist/shared/summarize/summarizeSpec.d.ts +54 -0
  245. package/dist/{summarize.js → shared/summarize/summarizeSpec.js} +23 -53
  246. package/dist/shared/summarize/world.d.ts +8 -0
  247. package/dist/shared/summarize/world.js +9 -0
  248. package/dist/shared/timePasses.d.ts +56 -0
  249. package/dist/shared/timePasses.js +86 -0
  250. package/dist/{toolLoop.d.ts → shared/toolLoop.d.ts} +25 -3
  251. package/dist/{toolLoop.js → shared/toolLoop.js} +70 -14
  252. package/dist/shared/ui/actions/index.d.ts +117 -0
  253. package/dist/shared/ui/actions/index.js +154 -0
  254. package/dist/shared/ui/album/index.d.ts +115 -0
  255. package/dist/shared/ui/album/index.js +178 -0
  256. package/dist/shared/ui/annex/index.d.ts +163 -0
  257. package/dist/shared/ui/annex/index.js +273 -0
  258. package/dist/shared/ui/attendance/index.d.ts +97 -0
  259. package/dist/shared/ui/attendance/index.js +89 -0
  260. package/dist/shared/ui/backdrop/index.d.ts +78 -0
  261. package/dist/shared/ui/backdrop/index.js +98 -0
  262. package/dist/shared/ui/chronicle/index.d.ts +230 -0
  263. package/dist/shared/ui/chronicle/index.js +249 -0
  264. package/dist/shared/ui/conversation/dossier.d.ts +33 -0
  265. package/dist/shared/ui/conversation/dossier.js +31 -0
  266. package/dist/{ui/sessions → shared/ui}/conversation/index.d.ts +2 -1
  267. package/dist/{ui/sessions → shared/ui}/conversation/index.js +3 -1
  268. package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.d.ts +1 -1
  269. package/dist/shared/ui/conversation/storyDays.d.ts +21 -0
  270. package/dist/shared/ui/conversation/storyDays.js +23 -0
  271. package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.d.ts +1 -1
  272. package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.js +1 -1
  273. package/dist/{ui/sessions → shared/ui}/lore-entries/index.d.ts +2 -2
  274. package/dist/shared/ui/places/index.d.ts +148 -0
  275. package/dist/shared/ui/places/index.js +249 -0
  276. package/dist/{ui/sessions → shared/ui}/scene-portraits/index.d.ts +1 -1
  277. package/dist/{ui/sessions → shared/ui}/scene-portraits/index.js +1 -1
  278. package/dist/shared/ui/scene-portraits/portraits.d.ts +191 -0
  279. package/dist/shared/ui/scene-portraits/portraits.js +223 -0
  280. package/dist/shared/ui/session-state/index.d.ts +16 -0
  281. package/dist/shared/ui/session-state/index.js +16 -0
  282. package/dist/{ui/sessions → shared/ui}/session-state/shapes.d.ts +2 -2
  283. package/dist/shared/ui/session-state/stateView.d.ts +249 -0
  284. package/dist/shared/ui/session-state/stateView.js +247 -0
  285. package/dist/shared/ui/turn-order/index.d.ts +146 -0
  286. package/dist/shared/ui/turn-order/index.js +257 -0
  287. package/dist/{ui/sessions → shared/ui}/widgetContext.d.ts +19 -10
  288. package/package.json +69 -30
  289. package/components/sessions/messages/SessionContainer.svelte +0 -459
  290. package/components/sessions/scene-portraits/ScenePortraitsWidget.svelte +0 -249
  291. package/components/sessions/stats/StatsWidget.svelte +0 -112
  292. package/components/sessions/world-state/WorldStateWidget.svelte +0 -112
  293. package/components/sessions/world-state/world-state.ts +0 -10
  294. package/dist/adventureActions.d.ts +0 -169
  295. package/dist/adventureActions.js +0 -599
  296. package/dist/createChat.d.ts +0 -7
  297. package/dist/generateImage.d.ts +0 -7
  298. package/dist/lairActions.d.ts +0 -296
  299. package/dist/lairActions.js +0 -1287
  300. package/dist/respond.d.ts +0 -24
  301. package/dist/sprites.d.ts +0 -24
  302. package/dist/sprites.js +0 -102
  303. package/dist/summarize.d.ts +0 -76
  304. package/dist/ui/sessions/conversation/dossier.d.ts +0 -328
  305. package/dist/ui/sessions/conversation/dossier.js +0 -31
  306. package/dist/ui/sessions/scene-portraits/portraits.d.ts +0 -95
  307. package/dist/ui/sessions/scene-portraits/portraits.js +0 -115
  308. package/dist/ui/sessions/session-state/index.d.ts +0 -15
  309. package/dist/ui/sessions/session-state/index.js +0 -15
  310. package/dist/ui/sessions/session-state/stateView.d.ts +0 -155
  311. package/dist/ui/sessions/session-state/stateView.js +0 -141
  312. package/dist/ui/sessions/widgets.js +0 -567
  313. package/components/{sessions → genres/chat}/authors-note/authors-note.ts +0 -0
  314. package/components/{sessions/shared → shared}/context.ts +0 -0
  315. package/components/{sessions → shared}/lore-entries/lore-entries.ts +0 -0
  316. package/components/{sessions → shared}/messages/MessageBlocksView.svelte +0 -0
  317. package/components/{sessions → shared}/messages/MessageMediaStrip.svelte +0 -0
  318. package/components/{sessions → shared}/messages/MessagePartsView.svelte +0 -0
  319. package/components/{sessions → shared}/messages/StateProposalList.svelte +0 -0
  320. package/components/{sessions → shared}/messages/mediaStrip.ts +0 -0
  321. package/components/{sessions → shared}/messages/messages.ts +0 -0
  322. package/components/{sessions → shared}/scene-portraits/StatBars.svelte +0 -0
  323. package/components/{sessions → shared}/scene-portraits/scene-portraits.ts +0 -0
  324. package/components/{sessions → shared}/state/entryFinder.ts +0 -0
  325. package/components/{sessions → shared}/state/slotWriter.svelte.ts +0 -0
  326. package/dist/components/{shared-RJDGOAVC.js → shared-FTRGUE7G.js} +78 -78
  327. /package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.js +0 -0
  328. /package/dist/{entries.js → registry/entries.js} +0 -0
  329. /package/dist/{genres.d.ts → registry/genres.d.ts} +0 -0
  330. /package/dist/{slots.d.ts → registry/slots.d.ts} +0 -0
  331. /package/dist/{slots.js → registry/slots.js} +0 -0
  332. /package/dist/{statShapes.d.ts → registry/statShapes.d.ts} +0 -0
  333. /package/dist/{statShapes.js → registry/statShapes.js} +0 -0
  334. /package/dist/{guideMascotImage.d.ts → seed/guideMascotImage.d.ts} +0 -0
  335. /package/dist/{guideMascotImage.js → seed/guideMascotImage.js} +0 -0
  336. /package/dist/{presets.d.ts → seed/presets.d.ts} +0 -0
  337. /package/dist/{graphBuild.d.ts → shared/graphBuild.d.ts} +0 -0
  338. /package/dist/{graphBuild.js → shared/graphBuild.js} +0 -0
  339. /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.d.ts +0 -0
  340. /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.js +0 -0
  341. /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.d.ts +0 -0
  342. /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.js +0 -0
  343. /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.d.ts +0 -0
  344. /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.js +0 -0
  345. /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.d.ts +0 -0
  346. /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.js +0 -0
  347. /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.d.ts +0 -0
  348. /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.js +0 -0
  349. /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.d.ts +0 -0
  350. /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.js +0 -0
  351. /package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.js +0 -0
  352. /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.d.ts +0 -0
  353. /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.js +0 -0
  354. /package/dist/{ui/sessions → shared/ui}/conversation/text.d.ts +0 -0
  355. /package/dist/{ui/sessions → shared/ui}/conversation/text.js +0 -0
  356. /package/dist/{ui/sessions → shared/ui}/lore-entries/index.js +0 -0
  357. /package/dist/{ui/sessions → shared/ui}/session-state/barMath.d.ts +0 -0
  358. /package/dist/{ui/sessions → shared/ui}/session-state/barMath.js +0 -0
  359. /package/dist/{ui/sessions → shared/ui}/session-state/shapes.js +0 -0
  360. /package/dist/{ui/sessions → shared/ui}/widgetContext.js +0 -0
@@ -21,6 +21,15 @@
21
21
  */
22
22
  export type LineWidth = "full" | "comfortable"
23
23
 
24
+ /**
25
+ * How the lines are drawn (PLAN-core-widgets §3.7): `rows`, the log as
26
+ * it has always been, or `folio` — one block of prose, a thin rule
27
+ * naming the speaker where the speaker changes, nothing else around a
28
+ * line. The SETTING also takes `auto` (§3.16, the declared default:
29
+ * _Follow the channel_), which the reader turns into one of the two.
30
+ */
31
+ export type Presentation = "rows" | "folio"
32
+
24
33
  /**
25
34
  * The `messages` widget's settings, complete: every value the widget reads,
26
35
  * with the declared default wherever the instance has no deviation. The
@@ -33,6 +42,12 @@
33
42
  composerSkin: ComposerSkin
34
43
  composerPosition: ComposerPosition
35
44
  lineWidth: LineWidth
45
+ /**
46
+ * The effective presentation: a stored `rows` or `folio`, else —
47
+ * `auto`, or nothing stored — `folio` when this copy's claimed
48
+ * channel is a folio-role one, else `rows`.
49
+ */
50
+ presentation: Presentation
36
51
  showMessages: boolean
37
52
  showComposer: boolean
38
53
  showAvatars: boolean
@@ -58,6 +73,7 @@
58
73
  composerSkin: "classic",
59
74
  composerPosition: "bottom",
60
75
  lineWidth: "full",
76
+ presentation: "rows",
61
77
  showMessages: true,
62
78
  showComposer: true,
63
79
  showAvatars: true,
@@ -83,30 +99,54 @@
83
99
  return typeof raw === "boolean" ? raw : fallback
84
100
  }
85
101
 
86
- /** Read one settings payload into the complete object above. */
102
+ /**
103
+ * Read one settings payload into the complete object above.
104
+ *
105
+ * `channelRole` is what the copy's claimed channel IS (`ChannelDecl.role`,
106
+ * off the dossier), and it decides the two values Folio changes when the
107
+ * settings leave them to it: a `presentation` of `auto` (the declared
108
+ * default, _Follow the channel_), or none, follows the channel (a folio
109
+ * channel reads as Folio), and a Folio copy's composer is the
110
+ * page line (`quill`) unless the copy chose a skin other than the declared
111
+ * default. Settings arrive complete, so `classic` — the default — is the
112
+ * one value that cannot say "chosen"; a Folio copy that wants the card
113
+ * back cannot have it, which is the price of a manuscript's page line.
114
+ */
87
115
  export function readConversationSettings(
88
- raw: Record<string, unknown> | undefined
116
+ raw: Record<string, unknown> | undefined,
117
+ channelRole: "conversation" | "folio" = "conversation"
89
118
  ): ConversationSettings {
90
119
  const v = raw ?? {}
91
120
  const d = CONVERSATION_DEFAULTS
121
+ // `auto` is neither of the two, so it falls to the channel's rule.
122
+ const presentation = pickEnum<Presentation>(
123
+ v.presentation,
124
+ ["rows", "folio"],
125
+ channelRole === "folio" ? "folio" : d.presentation
126
+ )
127
+ const folio = presentation === "folio"
128
+ const skin = pickEnum(
129
+ v.composer,
130
+ ["classic", "minimal", "writer", "quill"],
131
+ d.composerSkin
132
+ )
92
133
  return {
93
134
  order: pickEnum(v.order, ["oldest-first", "newest-first"], d.order),
94
- composerSkin: pickEnum(
95
- v.composer,
96
- ["classic", "minimal", "writer", "quill"],
97
- d.composerSkin
98
- ),
135
+ composerSkin: folio && skin === d.composerSkin ? "quill" : skin,
99
136
  composerPosition: pickEnum(
100
137
  v.composerPosition,
101
138
  ["bottom", "top"],
102
139
  d.composerPosition
103
140
  ),
104
141
  lineWidth: pickEnum(v.lineWidth, ["full", "comfortable"], d.lineWidth),
142
+ presentation,
105
143
  showMessages: pickBool(v.showMessages, d.showMessages),
106
144
  showComposer: pickBool(v.showComposer, d.showComposer),
107
145
  showAvatars: pickBool(v.showAvatars, d.showAvatars),
108
146
  showTimestamps: pickBool(v.showTimestamps, d.showTimestamps),
109
- showSceneMarkers: pickBool(v.showSceneMarkers, d.showSceneMarkers),
147
+ // A manuscript has no scenes or dates between its paragraphs.
148
+ showSceneMarkers:
149
+ !folio && pickBool(v.showSceneMarkers, d.showSceneMarkers),
110
150
  // ⏳ `showNudge: false` was this setting before `nextUp` (A8).
111
151
  nextUp: pickEnum(
112
152
  v.nextUp,
@@ -128,17 +168,19 @@
128
168
  * field you write into, as ONE widget.
129
169
  *
130
170
  * It owns the conversation (C0b): the model its parts read
131
- * (`conversation.svelte.ts`) and the log. The page still passes the
132
- * composer, the ready-to-continue line and the banners as snippets; this
133
- * component reads the widget's settings off `useWidgetContext()`, hands
134
- * them back to those snippets, writes them onto the root as data
135
- * attributes, and decides which end the composer sits at.
171
+ * (`conversation.svelte.ts`), the log, the turn line (`TurnLine`) and the
172
+ * composer; the page's own views (who is typing, the action chips) it
173
+ * places as `sp-host-view`s. It reads the widget's settings off
174
+ * `useWidgetContext()`, hands them to the page (`onSettings`), writes them
175
+ * onto the root as data attributes, and decides which end the composer
176
+ * sits at.
136
177
  */
137
- import { useWidgetContext } from "../shared/context"
178
+ import { useWidgetContext } from "../context"
138
179
  import SessionContainer from "./SessionContainer.svelte"
139
180
  import SessionComposer from "./SessionComposer.svelte"
140
- import NextCharacterBlock from "./NextCharacterBlock.svelte"
181
+ import TurnLine from "./TurnLine.svelte"
141
182
  import { createConversation, setConversation } from "./conversation.svelte"
183
+ import { markedRun, runOffer } from "./sceneMarks"
142
184
 
143
185
  interface Props {
144
186
  /**
@@ -165,6 +207,23 @@
165
207
  })
166
208
  const selecting = $derived(!!conversation?.select.active)
167
209
  const selectedCount = $derived(conversation?.select.ids.size ?? 0)
210
+ /**
211
+ * 🚧 *Mark as scene* (PROPOSAL-live-scenes §14 C): the selection's
212
+ * boundary path, offered first — the picked run becomes one closed live
213
+ * scene, opened at its first line and closed at its last, in one write.
214
+ * Offered only where the viewer may place scene boundaries and the run
215
+ * overlaps no scene on its lane (`runOffer`, lane E — an earlier run
216
+ * too); tick capture (*Scene summary*) stays beside it for now.
217
+ */
218
+ const markRun = $derived.by(() => {
219
+ if (!conversation?.scenes.boundaries || !selectedCount) return null
220
+ const rows = (conversation.rows ?? []) as Array<{ id: number; channel?: unknown }>
221
+ const run = markedRun(conversation.select.ids, rows)
222
+ return run && runOffer(run, conversation.dossier?.scenes ?? [], rows) ? run : null
223
+ })
224
+ const selectionRefusal = $derived(
225
+ conversation?.scenes.refusal?.at === "selection" ? conversation.scenes.refusal.text : null
226
+ )
168
227
  /** Every line a scene has not already captured. */
169
228
  const selectable = $derived.by(() => {
170
229
  const taken = new Set(conversation?.dossier?.scened ?? [])
@@ -172,11 +231,16 @@
172
231
  .map((m) => m.id)
173
232
  .filter((id) => !taken.has(id))
174
233
  })
175
- let settings = $derived(
176
- readConversationSettings(
177
- ctx?.current.settings.v1 as Record<string, unknown> | undefined
234
+ let settings = $derived.by(() => {
235
+ const raw = ctx?.current.settings.v1 as Record<string, unknown> | undefined
236
+ // The claimed channel's role, when the host says it (the dossier's
237
+ // `composer.channelRoles`): what an unset Presentation follows.
238
+ const claim = typeof raw?.channel === "string" ? raw.channel.trim() : ""
239
+ return readConversationSettings(
240
+ raw,
241
+ claim && conversation ? conversation.channelRole(claim) : "conversation"
178
242
  )
179
- )
243
+ })
180
244
 
181
245
  // Compared by value, the way `WidgetHost` compares its layout: the widget
182
246
  // context re-projects on every message that lands, and the settings on it
@@ -200,6 +264,7 @@
200
264
  data-composer-position={settings.composerPosition}
201
265
  data-composer-skin={settings.composerSkin}
202
266
  data-line-width={settings.lineWidth}
267
+ data-presentation={settings.presentation}
203
268
  data-show-messages={settings.showMessages}
204
269
  data-show-avatars={settings.showAvatars}
205
270
  data-show-timestamps={settings.showTimestamps}
@@ -226,7 +291,11 @@
226
291
  {#if settings.showMessages}
227
292
  <div data-widget-part="messages.log">
228
293
  {#if conversation}
229
- <SessionContainer order={settings.order} showSceneMarkers={settings.showSceneMarkers} />
294
+ <SessionContainer
295
+ order={settings.order}
296
+ showSceneMarkers={settings.showSceneMarkers}
297
+ presentation={settings.presentation}
298
+ />
230
299
  {/if}
231
300
  </div>
232
301
  {/if}
@@ -240,6 +309,19 @@
240
309
  <div data-widget-part="messages.compose-area">
241
310
  <!-- The selection bar's parts are `messages.selection-*` (STYLE-GUIDE
242
311
  §6.16): no look here; the default widget stylesheet draws them. -->
312
+ {#if selectionRefusal}
313
+ <p data-widget-part="messages.scene-refusal" role="alert">
314
+ <span data-widget-part="messages.scene-refusal-text">{selectionRefusal}</span>
315
+ <button
316
+ type="button"
317
+ data-widget-part="messages.scene-refusal-dismiss messages.message-icon-button"
318
+ aria-label="Dismiss"
319
+ onclick={() => conversation.scenes.dismiss()}
320
+ >
321
+ <sp-icon name="x" size="14"></sp-icon>
322
+ </button>
323
+ </p>
324
+ {/if}
243
325
  <div data-widget-part="messages.selection-bar toolbar">
244
326
  <span data-widget-part="messages.selection-count">
245
327
  {selectedCount}
@@ -272,17 +354,35 @@
272
354
  <sp-icon name="x" size="16"></sp-icon>
273
355
  <span data-widget-part="messages.selection-button-label">Cancel</span>
274
356
  </button>
357
+ <!-- 🚧 The boundary path first: the run becomes one live
358
+ scene, summarized later from its divider. -->
359
+ {#if conversation.scenes.boundaries}
360
+ <button
361
+ data-widget-part="messages.mark-scene messages.selection-button"
362
+ title="Make these lines one scene: it starts at the first line picked and ends at the last"
363
+ disabled={!markRun || conversation.scenes.busy}
364
+ onclick={() => void conversation.scenes.markSelection()}
365
+ >
366
+ <sp-icon name="flag" size="16"></sp-icon>
367
+ <span data-widget-part="messages.selection-button-label">Mark as scene</span>
368
+ </button>
369
+ {/if}
275
370
  <!-- A scene summary opens a scene, which is its own declared
276
- write (R-B): a genre that opens none does not offer it. -->
371
+ write (R-B): a genre that opens none does not offer it.
372
+ ⏳ Tick capture, kept while live scenes land. -->
277
373
  {#if conversation.dossier?.writes.scenes}
278
374
  <button
279
375
  data-widget-part="messages.summarize-scene messages.selection-button"
280
- title="Scene"
376
+ title={conversation.scenes.boundaries
377
+ ? "Summarize the picked lines as a scene, now"
378
+ : "Scene"}
281
379
  disabled={selectedCount === 0}
282
380
  onclick={() => conversation.select.commit("scene")}
283
381
  >
284
382
  <sp-icon name="film" size="16"></sp-icon>
285
- <span data-widget-part="messages.selection-button-label">Scene</span>
383
+ <span data-widget-part="messages.selection-button-label">
384
+ {conversation.scenes.boundaries ? "Scene summary" : "Scene"}
385
+ </span>
286
386
  </button>
287
387
  {/if}
288
388
  <button
@@ -310,23 +410,9 @@
310
410
  {:else if settings.showComposer && conversation}
311
411
  {@const dossier = conversation.dossier}
312
412
  <div data-widget-part="messages.compose">
313
- <!-- The page's status strips (who is typing, a stale preset). -->
314
- <sp-host-view name="session-banners"></sp-host-view>
315
- {#if settings.nextUp !== "hidden" && dossier && !dossier.readOnly}
316
- <div data-widget-part="messages.next-up">
317
- <NextCharacterBlock
318
- order={dossier.turn.order}
319
- candidates={dossier.turn.candidates}
320
- mode={settings.nextUp}
321
- shouldShow={dossier.turn.show && conversation.edit.id === null}
322
- avatarFor={(ref) => (ref.startsWith("character:") ? ref : undefined)}
323
- canChooseSomeoneElse={dossier.turn.canChoose}
324
- viewerUserId={conversation.ctx.viewer.v1.userId}
325
- onContinue={(channel) => void conversation.request("fire-turn", { channel })}
326
- onSomeoneElse={() => void conversation.request("pick-turn", {})}
327
- />
328
- </div>
329
- {/if}
413
+ <!-- The turn line (§3.16): what the last run did, and who is next —
414
+ one row above the field. -->
415
+ <TurnLine nextUp={settings.nextUp} />
330
416
  <div data-widget-part="messages.compose-area">
331
417
  {#if dossier?.readOnly}
332
418
  <!-- Read-only (19 §6, ruled): the mode disappeared, the history
@@ -23,8 +23,11 @@
23
23
  * channel's entry. "Someone else" asks the page to open the turn picker.
24
24
  * With `mode: 'list'` the entries after the head follow as one quiet line.
25
25
  *
26
- * Its parts are `messages.next-up-*` (STYLE-GUIDE §6.16): the markup
27
- * carries no look; the default widget stylesheet draws it.
26
+ * It draws the turn line's right half (`TurnLine`, PLAN-core-widgets
27
+ * §3.16). Its parts are `messages.turn-line-*` (STYLE-GUIDE §6.16), each
28
+ * beside its old name `messages.next-up-*`, ⏳ kept one release so a
29
+ * person's style keeps matching: the markup carries no look; the default
30
+ * widget stylesheet draws it, keyed on the new names.
28
31
  */
29
32
  import type { NextUp } from "./MessagesWidget.svelte"
30
33
  import { useConversation } from "./conversation.svelte"
@@ -102,44 +105,44 @@
102
105
  </script>
103
106
 
104
107
  {#if shouldShow && !order.length && candidates.length}
105
- <div data-widget-part="messages.next-up-waiting">
106
- <span data-widget-part="messages.next-up-text">
108
+ <div data-widget-part="messages.turn-line-waiting messages.next-up-waiting">
109
+ <span data-widget-part="messages.turn-line-text messages.next-up-text">
107
110
  Waiting for a message — or pick who speaks next
108
111
  </span>
109
- <button type="button" data-widget-part="messages.next-up-pick" onclick={onSomeoneElse}>
112
+ <button type="button" data-widget-part="messages.turn-line-pick messages.next-up-pick" onclick={onSomeoneElse}>
110
113
  <sp-icon name="users" size="14"></sp-icon>
111
114
  <span>Pick</span>
112
115
  </button>
113
116
  </div>
114
117
  {:else if shouldShow && head}
115
118
  <!-- One line: who is up, and what you can do about it. -->
116
- <div data-widget-part="messages.next-up-head">
117
- <div data-widget-part="messages.next-up-line">
119
+ <div data-widget-part="messages.turn-line-head messages.next-up-head">
120
+ <div data-widget-part="messages.turn-line-due messages.next-up-line">
118
121
  {#if face}
119
122
  <sp-avatar ref={head.ref} size="sm"></sp-avatar>
120
123
  {:else if head.ref === null}
121
- <sp-icon name="book-open-text" size="18" data-widget-part="messages.next-up-narrator"></sp-icon>
124
+ <sp-icon name="book-open-text" size="18" data-widget-part="messages.turn-line-narrator messages.next-up-narrator"></sp-icon>
122
125
  {/if}
123
- <span data-widget-part="messages.next-up-text">
126
+ <span data-widget-part="messages.turn-line-text messages.next-up-text">
124
127
  {line}
125
128
  </span>
126
- <div data-widget-part="messages.next-up-controls">
129
+ <div data-widget-part="messages.turn-line-controls messages.next-up-controls">
127
130
  {#if canChooseSomeoneElse}
128
131
  <button
129
132
  type="button"
130
- data-widget-part="messages.next-up-pick"
133
+ data-widget-part="messages.turn-line-pick messages.next-up-pick"
131
134
  onclick={onSomeoneElse}
132
135
  title="Someone else"
133
136
  aria-label="Pick someone else to continue"
134
137
  >
135
138
  <sp-icon name="users" size="14"></sp-icon>
136
- <span data-widget-part="messages.next-up-pick-label">Someone else</span>
139
+ <span data-widget-part="messages.turn-line-pick-label messages.next-up-pick-label">Someone else</span>
137
140
  </button>
138
141
  {/if}
139
142
  {#if !headIsPerson}
140
143
  <button
141
144
  type="button"
142
- data-widget-part="messages.next-up-continue"
145
+ data-widget-part="messages.turn-line-continue messages.next-up-continue"
143
146
  onclick={() => onContinue(channel)}
144
147
  title="Continue"
145
148
  aria-label="Continue with {headName}"
@@ -151,7 +154,7 @@
151
154
  </div>
152
155
  </div>
153
156
  {#if after.length}
154
- <p data-widget-part="messages.next-up-after">
157
+ <p data-widget-part="messages.turn-line-after messages.next-up-after">
155
158
  Then {after.map((e) => nameOf(e.ref)).join(", ")}
156
159
  </p>
157
160
  {/if}
@@ -0,0 +1,82 @@
1
+ <script lang="ts">
2
+ import { useConversation } from "./conversation.svelte"
3
+
4
+ /**
5
+ * 🚧 A **scene cue**'s chip (PROPOSAL-live-scenes §4, §7; lane E):
6
+ * Suggested scene mode's quiet *New scene?* in the scene divider's slot,
7
+ * before the line the next scene would open at, saying why (the
8
+ * triggers that fired there, in words). **Yes** opens a scene at the line
9
+ * (the lane's open scene closes at the line before); **Not here** sets
10
+ * every cue at the line aside, never offered there again. Drawn only where
11
+ * the viewer may place a boundary (the dossier's `sceneBoundaries`); a
12
+ * refusal is said here, under the chip.
13
+ */
14
+ interface Props {
15
+ cue: { id: number; reason: string }
16
+ /** Drawn hidden: its line is on another lane than the log shows. */
17
+ hidden?: boolean
18
+ }
19
+
20
+ let { cue, hidden = false }: Props = $props()
21
+
22
+ const conv = useConversation()
23
+ const refusal = $derived(
24
+ conv.scenes.refusal?.at === "cue" && conv.scenes.refusal.id === cue.id
25
+ ? conv.scenes.refusal.text
26
+ : null
27
+ )
28
+ const decide = (accept: boolean) => (e: Event) => {
29
+ if (conv.scenes.busy) return e.preventDefault()
30
+ void conv.scenes.decideCue(cue.id, accept)
31
+ }
32
+ </script>
33
+
34
+ <!-- A `messages.log-item` in the divider's slot: the chip's parts are
35
+ `messages.scene-cue*` (STYLE-GUIDE §6.16), drawn by the default sheet. -->
36
+ <li
37
+ data-widget-part="messages.log-item messages.scene-cue"
38
+ role="presentation"
39
+ data-cue={cue.id}
40
+ {hidden}
41
+ >
42
+ <div data-widget-part="messages.scene-cue-body" role="group" aria-label="New scene?">
43
+ <sp-icon name="flag" size="14" data-widget-part="messages.scene-cue-icon"></sp-icon>
44
+ <span data-widget-part="messages.scene-cue-text">
45
+ New scene?
46
+ {#if cue.reason}
47
+ <span data-widget-part="messages.scene-cue-reason">— {cue.reason}</span>
48
+ {/if}
49
+ </span>
50
+ <button
51
+ type="button"
52
+ data-widget-part="messages.scene-cue-accept"
53
+ title="Start a new scene at this line"
54
+ aria-disabled={conv.scenes.busy}
55
+ onclick={decide(true)}
56
+ >
57
+ Yes
58
+ </button>
59
+ <button
60
+ type="button"
61
+ data-widget-part="messages.scene-cue-decline"
62
+ title="No new scene at this line; it is not suggested here again"
63
+ aria-disabled={conv.scenes.busy}
64
+ onclick={decide(false)}
65
+ >
66
+ Not here
67
+ </button>
68
+ </div>
69
+ {#if refusal}
70
+ <p data-widget-part="messages.scene-refusal" role="alert">
71
+ <span data-widget-part="messages.scene-refusal-text">{refusal}</span>
72
+ <button
73
+ type="button"
74
+ data-widget-part="messages.scene-refusal-dismiss messages.message-icon-button"
75
+ aria-label="Dismiss"
76
+ onclick={() => conv.scenes.dismiss()}
77
+ >
78
+ <sp-icon name="x" size="14"></sp-icon>
79
+ </button>
80
+ </p>
81
+ {/if}
82
+ </li>