@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
@@ -0,0 +1,1294 @@
1
+ /**
2
+ * Core's built-in session widgets (PLAN 25) — part of the announcement (24 §9),
3
+ * the same as the genres, pipelines and hooks core ships. SP boot-seeds each
4
+ * widget's style presets from `CORE_WIDGETS` (create-if-absent by seedKey, the
5
+ * standing rule), and the app mounts each widget's `component` — core's own
6
+ * component module, served at `/core-ui/<slug>` — remote (R79).
7
+ *
8
+ * A "widget" is a session-surface component — the conversation, a portrait
9
+ * panel, a plugin's board. Every widget names a component; a plugin that needs
10
+ * a real document places an `sp-frame` inside its component.
11
+ *
12
+ * ## Where the declaration lives
13
+ *
14
+ * `WidgetDecl` and its parts live in the SDK (`layout.ts`), because a plugin
15
+ * declaring a widget should not have to import core's catalogue to say what
16
+ * one is. They are re-exported here so every existing import — the app's
17
+ * `$lib/shared/widgets/types` chain included — keeps resolving through one
18
+ * module.
19
+ */
20
+ export { systemStyleSlug, } from '@serene-pub/sdk';
21
+ import { component, ownWidgets } from '@serene-pub/sdk';
22
+ /**
23
+ * A widget ships at least one "default" style so a fresh layout always resolves
24
+ * to something. Empty `css` means the base look (the widget's own styling with
25
+ * no skin on top); it exists as a row so the layout's id+slug reference has a
26
+ * concrete, reseed-stable target to point at.
27
+ */
28
+ const DEFAULT_PRESET = {
29
+ slug: 'default',
30
+ title: 'Default',
31
+ css: '',
32
+ };
33
+ /**
34
+ * The built-in session widgets. Pure data — no component imports — so the
35
+ * server-side style reconciler reads it at boot without pulling the client
36
+ * bundle; the client maps each `component` to a Svelte component.
37
+ * @experimental
38
+ */
39
+ export const CORE_WIDGETS = [
40
+ /**
41
+ * The conversation: the log and the field you write into, as ONE widget.
42
+ *
43
+ * They are one because they are one thing to arrange — a transcript with
44
+ * nowhere to reply is not a session surface, and every layout that ever
45
+ * placed them placed them touching. Keeping them apart bought a second
46
+ * anchor guarantee, a second style target and a second row in every grid,
47
+ * and paid for none of it: the pair moved together or not at all.
48
+ *
49
+ * So the composer is a SETTING here rather than a widget beside this one.
50
+ * `composer` picks how the field is drawn, `composerPosition` which end it
51
+ * sits at, and `showComposer` whether it is drawn at all — which is what a
52
+ * read-only view of a session is, rather than a widget somebody removed.
53
+ */
54
+ {
55
+ id: 'messages',
56
+ title: 'Messages',
57
+ /**
58
+ * The primary widget: every layout places one, in whichever zone a
59
+ * person puts it (the primary floor), and as many more copies as they
60
+ * add — a Sanctum panel, a second view of the story.
61
+ */
62
+ role: 'primary',
63
+ component: 'messages',
64
+ /**
65
+ * What the conversation's source reads (R75): its box's tier, the
66
+ * log, the message venues, its settings, the viewer and the locale.
67
+ * Everything else it is told arrives in its dossier (`session:full`,
68
+ * the page's grant to core's own conversation).
69
+ */
70
+ reads: ['layout', 'messages', 'actions', 'settings', 'viewer', 'locale'],
71
+ presets: [DEFAULT_PRESET],
72
+ settings: {
73
+ composer: {
74
+ type: 'enum',
75
+ label: 'Composer',
76
+ description: 'How the message field is drawn: the classic card, a ' +
77
+ 'single-line pill, a tall editor for long turns, or a ' +
78
+ 'page line — no box, the next line of the story on a ' +
79
+ 'faint underline.',
80
+ of: ['classic', 'minimal', 'writer', 'quill'],
81
+ members: [
82
+ { key: 'classic', label: 'Classic card' },
83
+ { key: 'minimal', label: 'Single-line pill' },
84
+ { key: 'writer', label: 'Tall editor' },
85
+ // The quill skin (next-pass note 22, 2026-10-02): writing
86
+ // on the page itself, as if into an ebook.
87
+ { key: 'quill', label: 'Page line' },
88
+ ],
89
+ default: 'classic',
90
+ },
91
+ composerPosition: {
92
+ type: 'enum',
93
+ label: 'Composer position',
94
+ description: 'Which end of the log you write at.',
95
+ of: ['bottom', 'top'],
96
+ members: [
97
+ { key: 'bottom', label: 'Bottom' },
98
+ { key: 'top', label: 'Top' },
99
+ ],
100
+ default: 'bottom',
101
+ },
102
+ /**
103
+ * How wide the log's rows and the composer run. `full` fills the
104
+ * width the layout gives the widget — the default, because a widget
105
+ * fills its box; `comfortable` holds them to a reading measure
106
+ * (about 640px of prose), centred on the session. It was a hidden
107
+ * cap before it was a setting (ruled 2026-09-29).
108
+ */
109
+ lineWidth: {
110
+ type: 'enum',
111
+ label: 'Line width',
112
+ description: 'Full uses the whole width of the panel; Comfortable keeps ' +
113
+ 'lines to an easy reading length, centred.',
114
+ of: ['full', 'comfortable'],
115
+ members: [
116
+ { key: 'full', label: 'Full' },
117
+ { key: 'comfortable', label: 'Comfortable' },
118
+ ],
119
+ default: 'full',
120
+ },
121
+ /**
122
+ * How the lines are drawn (PLAN-core-widgets §3.7, Q7: a setting,
123
+ * not a widget — the data, the channel claim and the composer are
124
+ * the same; only the drawing changes). `rows` is the log as it has
125
+ * always been; `folio` reads the lines as one block of prose: each
126
+ * line's body a paragraph, a thin rule naming the speaker where the
127
+ * speaker changes, no avatar, name row, time or swipes, scene
128
+ * markers off, and the composer on the page line unless the copy
129
+ * chose another skin.
130
+ *
131
+ * The default is `auto`, **Follow the channel** (PLAN-core-widgets
132
+ * §3.16): settings arrive complete (defaults filled in), so a
133
+ * declared `rows` would be indistinguishable from a person's
134
+ * `rows`, and an undeclared default left the settings sheet's
135
+ * select empty. `auto` says "unset" out loud: a copy whose `channel`
136
+ * claim names a `folio`-role channel (`ChannelDecl.role`, the
137
+ * Writing Room's manuscript) draws as Folio, every other copy as
138
+ * Rows. A stored `rows` or `folio` wins either way.
139
+ */
140
+ presentation: {
141
+ type: 'enum',
142
+ label: 'Presentation',
143
+ description: 'Rows draws each line with its avatar and controls; Folio ' +
144
+ 'reads the lines as one block of prose, the way a manuscript ' +
145
+ 'reads. Follow the channel reads a manuscript-style channel ' +
146
+ 'as Folio and any other as Rows.',
147
+ of: ['auto', 'rows', 'folio'],
148
+ members: [
149
+ { key: 'auto', label: 'Follow the channel' },
150
+ { key: 'rows', label: 'Rows' },
151
+ { key: 'folio', label: 'Folio' },
152
+ ],
153
+ default: 'auto',
154
+ },
155
+ order: {
156
+ type: 'enum',
157
+ label: 'Message order',
158
+ description: 'Newest messages at the bottom, or at the top.',
159
+ of: ['oldest-first', 'newest-first'],
160
+ members: [
161
+ { key: 'oldest-first', label: 'Newest at the bottom' },
162
+ { key: 'newest-first', label: 'Newest at the top' },
163
+ ],
164
+ default: 'oldest-first',
165
+ },
166
+ showMessages: {
167
+ type: 'boolean',
168
+ label: 'Show messages',
169
+ default: true,
170
+ },
171
+ showComposer: {
172
+ type: 'boolean',
173
+ label: 'Show composer',
174
+ default: true,
175
+ },
176
+ /**
177
+ * Which channel this copy shows (lair re-plan S1). Unset, it is the
178
+ * **primary log**: every channel no other placed Messages widget
179
+ * claims, so a layout with one Messages widget is the whole session,
180
+ * as it always was. Set, it shows that channel alone: its composer
181
+ * writes there, its turn controls are that channel's, and its head
182
+ * names the channel by its declared label (the Lair's Sanctum). The
183
+ * host narrows what the conversation is told (its composer's
184
+ * channels); this value is the claim it narrows by.
185
+ */
186
+ channel: {
187
+ type: 'string',
188
+ label: 'Channel',
189
+ description: "Show one channel only, by its slug (the Lair's is sanctum). " +
190
+ 'Empty shows every channel no other Messages widget shows.',
191
+ group: 'behaviour',
192
+ },
193
+ /**
194
+ * The furniture around a turn, all of it on by default and all of
195
+ * it behind the advanced fold: a person who wants a barer log says
196
+ * so one piece at a time, and a person who never opens the fold
197
+ * sees the whole of it, which is what a session looks like.
198
+ */
199
+ showAvatars: {
200
+ type: 'boolean',
201
+ label: 'Show avatars',
202
+ default: true,
203
+ group: 'behaviour',
204
+ },
205
+ /**
206
+ * The face beside each line (DESIGN-sprites §7): the character's
207
+ * avatar, or the **sprite that line showed** — set and label
208
+ * recorded on the line, so an outfit change keeps the old outfit on
209
+ * the old lines. Avatar by default: a face per line is busy in the
210
+ * bubble skins, and a character with no sprites shows its avatar
211
+ * either way.
212
+ */
213
+ avatarFace: {
214
+ type: 'enum',
215
+ label: 'Face beside each line',
216
+ description: "The character's avatar, or the sprite that line showed.",
217
+ of: ['avatar', 'sprite'],
218
+ members: [
219
+ { key: 'avatar', label: 'Avatar' },
220
+ { key: 'sprite', label: 'The line\'s sprite' },
221
+ ],
222
+ default: 'avatar',
223
+ group: 'behaviour',
224
+ showIf: { field: 'showAvatars', equals: true },
225
+ },
226
+ showTimestamps: {
227
+ type: 'boolean',
228
+ label: 'Show times',
229
+ default: true,
230
+ group: 'behaviour',
231
+ },
232
+ showSceneMarkers: {
233
+ type: 'boolean',
234
+ label: 'Show scenes and dates',
235
+ default: true,
236
+ group: 'behaviour',
237
+ },
238
+ /**
239
+ * Who is due next (PLAN-turn-order §4.9): the head of the stored
240
+ * turn order with Continue (`head`), the head and who follows
241
+ * (`list`), or nothing (`hidden`). Replaces the `showNudge`
242
+ * boolean; a stored `showNudge: false` still reads as `hidden`.
243
+ */
244
+ nextUp: {
245
+ type: 'enum',
246
+ label: 'Who is due next',
247
+ description: 'Show who speaks next, who speaks after them too, or nothing.',
248
+ of: ['head', 'list', 'hidden'],
249
+ members: [
250
+ { key: 'head', label: 'Who speaks next' },
251
+ { key: 'list', label: 'Who speaks next and after them' },
252
+ { key: 'hidden', label: 'Nothing' },
253
+ ],
254
+ default: 'head',
255
+ group: 'behaviour',
256
+ },
257
+ showActions: {
258
+ type: 'boolean',
259
+ label: 'Show the Actions label',
260
+ default: true,
261
+ group: 'behaviour',
262
+ },
263
+ },
264
+ },
265
+ {
266
+ id: 'scene-portraits',
267
+ title: 'Scene Portraits',
268
+ // Its own glyph since W6 (2026-10-11): a framed face. `Users` is the
269
+ // accounts' — Who's here holds it (NOMENCLATURE §22).
270
+ icon: 'SquareUserRound',
271
+ component: 'scene-portraits',
272
+ layout: { span: { ideal: 1 }, minInline: 200 },
273
+ /**
274
+ * The cast, cast over card (`characters`, R76) — each member's
275
+ * current sprite and last line's time resolved, its gallery paged by
276
+ * `character-images` — and the state its stat bars draw
277
+ * (`session:state`, R72).
278
+ */
279
+ scopes: ['characters', 'session:state'],
280
+ /**
281
+ * Its settings alone — never the log: each member's current sprite
282
+ * and when it last spoke arrive on `characters`.
283
+ */
284
+ reads: ['settings'],
285
+ presets: [DEFAULT_PRESET],
286
+ /**
287
+ * Three questions, one setting each (PLAN-core-widgets W6, ruled
288
+ * 2026-10-10 Q8): **who** (`who`), **which picture** (`face`) and
289
+ * **how laid out** (`arrangement`). The old one-axis `source`
290
+ * squashed two of them into one: ⏳ it and `sprites` are still read
291
+ * (a stored `source: pinned` is `who: pick` · `face: chosen` ·
292
+ * `arrangement: stage`; `sprites: false` is `face: avatar`), are
293
+ * never shown, and go at the 0.7 squash.
294
+ */
295
+ settings: {
296
+ who: {
297
+ type: 'enum',
298
+ label: 'Show',
299
+ description: 'Everyone in the scene; whoever spoke last, newest first; or only the ' +
300
+ 'members you name.',
301
+ of: ['scene', 'recent', 'pick'],
302
+ members: [
303
+ { key: 'scene', label: 'Everyone in the scene' },
304
+ { key: 'recent', label: 'Whoever spoke last' },
305
+ { key: 'pick', label: 'Members you pick' },
306
+ ],
307
+ default: 'scene',
308
+ },
309
+ recentTurns: {
310
+ type: 'integer',
311
+ label: 'How many',
312
+ description: 'Show up to this many of the members who spoke most recently.',
313
+ min: 1,
314
+ max: 20,
315
+ default: 3,
316
+ showIf: { field: 'who', equals: 'recent' },
317
+ },
318
+ /** One member per line, as Stats' `pickOwners` is: a name as the session shows it, or `character:<id>`. */
319
+ pickMembers: {
320
+ type: 'string[]',
321
+ label: 'Members',
322
+ description: 'One per line, by the name the session shows. They are drawn in this order.',
323
+ default: [],
324
+ showIf: { field: 'who', equals: 'pick' },
325
+ },
326
+ /**
327
+ * Faces follow the conversation by default (DESIGN-sprites §7):
328
+ * each member's CURRENT sprite — the one on the newest line it
329
+ * spoke — and its avatar when it has none. ⚠ The setting is which
330
+ * picture a face shows; `SessionCharacterV1.face` is the avatar's
331
+ * URL.
332
+ */
333
+ face: {
334
+ type: 'enum',
335
+ label: 'Picture',
336
+ description: "Each character's avatar; its current sprite, which follows the " +
337
+ "conversation; or an image chosen from the character's gallery.",
338
+ of: ['avatar', 'sprite', 'chosen'],
339
+ members: [
340
+ { key: 'avatar', label: 'Avatar' },
341
+ { key: 'sprite', label: 'Current sprite' },
342
+ { key: 'chosen', label: 'Chosen image' },
343
+ ],
344
+ default: 'sprite',
345
+ },
346
+ /**
347
+ * 🚧 Each member's **chosen image**, `character:<id>=<image ref>`
348
+ * per entry — the settings language has no map. The ref is what
349
+ * `character-images` answers each image with. Behaviour: the face's
350
+ * own chooser is where an image is picked, and writes it here
351
+ * (`set-chosen-image`, F2).
352
+ */
353
+ chosenImages: {
354
+ type: 'string[]',
355
+ label: 'Chosen images',
356
+ description: 'One per line: the character, then = and the image (character:3=…). ' +
357
+ 'A character with none shows its avatar.',
358
+ default: [],
359
+ showIf: { field: 'face', equals: 'chosen' },
360
+ group: 'behaviour',
361
+ },
362
+ arrangement: {
363
+ type: 'enum',
364
+ label: 'Arrangement',
365
+ description: 'A row, a grid that wraps, a column, or a stage: the first two, large, side by side.',
366
+ of: ['row', 'grid', 'column', 'stage'],
367
+ members: [
368
+ { key: 'row', label: 'Row' },
369
+ { key: 'grid', label: 'Grid' },
370
+ { key: 'column', label: 'Column' },
371
+ { key: 'stage', label: 'Stage' },
372
+ ],
373
+ default: 'grid',
374
+ },
375
+ /**
376
+ * The persona is in the scene but is not cast: it carries no state
377
+ * of its own, so it draws a face and no bars. Off by default — a
378
+ * player looking at the party is usually looking at the others.
379
+ * Read by `scene` and `recent`; `pick` shows whomever it names.
380
+ */
381
+ persona: {
382
+ type: 'boolean',
383
+ label: 'Include your persona',
384
+ description: 'Put the persona you play beside the cast.',
385
+ default: false,
386
+ },
387
+ /**
388
+ * The common case for stats is one row of bars under a face, so it
389
+ * is a setting here rather than a second widget beside this one.
390
+ * Off by default: a genre that declares no slots would otherwise
391
+ * grow an empty strip under every portrait.
392
+ */
393
+ bars: {
394
+ type: 'boolean',
395
+ label: 'Show stat bars',
396
+ description: "Draw each portrait's bounded stats as a mini bar row under it.",
397
+ default: false,
398
+ },
399
+ /**
400
+ * ⏳ The old `source`. No default, so a value is only ever one a
401
+ * layout or a person stored: `scene` stays stored as the mark of an
402
+ * instance that never drew pins (the page seeds chosen images only
403
+ * into one that did, or that stored nothing); `pinned` is moved to
404
+ * the three axes by every prune, so the `showIf` on its own value
405
+ * keeps it off the settings sheet. REMOVE in 0.7.0.
406
+ */
407
+ source: {
408
+ type: 'enum',
409
+ label: 'Show (old setting)',
410
+ description: 'Replaced by Show, Picture and Arrangement.',
411
+ of: ['pinned', 'scene'],
412
+ showIf: { field: 'source', equals: 'pinned' },
413
+ group: 'behaviour',
414
+ },
415
+ /**
416
+ * ⏳ The old sprites switch, moved to `face` by every prune (`false`
417
+ * is `avatar`), so never shown. REMOVE in 0.7.0.
418
+ */
419
+ sprites: {
420
+ type: 'boolean',
421
+ label: 'Show sprites (old setting)',
422
+ description: 'Replaced by Picture.',
423
+ showIf: { field: 'sprites', equals: false },
424
+ group: 'behaviour',
425
+ },
426
+ },
427
+ },
428
+ /**
429
+ * Lore entries (PLAN-sdk-1.0 §3.9, R58): the session's lorebook, entry by
430
+ * entry, with what this session's rankings made of each — how often it
431
+ * was read, when last, at what rank — and the two marks, **Off** and
432
+ * **Pin**. Search, sort and filter; paged. For the book's owner (and
433
+ * admins): anyone else sees one line saying whose it is, because
434
+ * `WidgetDecl` has no visibility field and the widget says it itself.
435
+ */
436
+ {
437
+ id: 'lore-entries',
438
+ title: 'Lore entries',
439
+ icon: 'BookOpen',
440
+ component: 'lore-entries',
441
+ layout: { span: { ideal: 1 }, minInline: 260 },
442
+ /** The grant `session-entries` pages the book with — nothing is pushed. */
443
+ scopes: ['lore'],
444
+ /**
445
+ * Its settings alone, as stats and world state: the page names its
446
+ * own session for both of its requests (`session-entries`,
447
+ * `set-entry-marks`).
448
+ */
449
+ reads: ['settings'],
450
+ presets: [DEFAULT_PRESET],
451
+ settings: {
452
+ sort: {
453
+ type: 'enum',
454
+ label: 'Sort by',
455
+ description: 'Name, when it was last read, how often it was read, or its last rank.',
456
+ of: ['name', 'lastRead', 'timesRead', 'rank'],
457
+ members: [
458
+ { key: 'name', label: 'Name' },
459
+ { key: 'lastRead', label: 'Last read' },
460
+ { key: 'timesRead', label: 'Times read' },
461
+ { key: 'rank', label: 'Last rank' },
462
+ ],
463
+ default: 'lastRead',
464
+ },
465
+ pageSize: {
466
+ type: 'integer',
467
+ label: 'Entries per page',
468
+ default: 25,
469
+ min: 5,
470
+ max: 100,
471
+ group: 'behaviour',
472
+ },
473
+ },
474
+ },
475
+ /**
476
+ * Stats — the session surface over the attribute slots
477
+ * (`docs/stats-and-states.md`), for every owner that holds them: the
478
+ * world, the cast, the places. One widget with three axes since the Stats
479
+ * uplift (PLAN-core-widgets W7, 2026-10-11): `owners` (whose), `slots`
480
+ * (which) and `arrangement` (how — cards, a list down a rail, a strip
481
+ * across the top). World State was this widget drawn for the world as a
482
+ * strip, so its id is now an alias (`WIDGET_ID_ALIASES`): a layout that
483
+ * places `world-state` draws Stats with `owners: world, arrangement:
484
+ * strip` under its own settings. A layout that wants both the world strip
485
+ * and the party's cards places Stats twice (`stats#world`).
486
+ *
487
+ * R79 removed the Inventory widget for now; what somebody carries is the
488
+ * `inventory` list stat, drawn here like any list. Its id is retired
489
+ * (`RETIRED_WIDGET_IDS`), so a stored layout that still places it draws
490
+ * nothing there.
491
+ *
492
+ * A core remote component (R21): it reads the `session_state` section,
493
+ * and every edit it offers is the USER's, which applies immediately.
494
+ * Nothing here is a review gate — the gate is in the transcript, where the
495
+ * model's proposals wait, because the gate exists for the writer with no
496
+ * authority. A genre that declares no slots gives it an empty state, so
497
+ * adding one to a chat session costs nothing and says so.
498
+ */
499
+ {
500
+ id: 'stats',
501
+ title: 'Stats',
502
+ icon: 'HeartPulse',
503
+ component: 'stats',
504
+ layout: { span: { ideal: 1 }, minInline: 220 },
505
+ /** The session's state (R72): its owners, slots and values — never the log. */
506
+ scopes: ['session:state'],
507
+ reads: ['settings'],
508
+ presets: [DEFAULT_PRESET],
509
+ settings: {
510
+ owners: {
511
+ type: 'enum',
512
+ label: 'Whose stats',
513
+ description: "Cast draws the cast's; World the world's, with any place that " +
514
+ 'has a stat in play under it; Places every place in play; All ' +
515
+ 'draws the world, the cast and the places, each under its own ' +
516
+ 'heading; Pick draws the ones you name.',
517
+ of: ['cast', 'world', 'places', 'all', 'pick'],
518
+ members: [
519
+ { key: 'cast', label: 'Cast' },
520
+ { key: 'world', label: 'World' },
521
+ { key: 'places', label: 'Places' },
522
+ { key: 'all', label: 'All' },
523
+ { key: 'pick', label: 'Pick' },
524
+ ],
525
+ default: 'cast',
526
+ },
527
+ pickOwners: {
528
+ type: 'string[]',
529
+ label: 'Which owners',
530
+ description: "One name per line: a cast member, a place, or 'World'.",
531
+ default: [],
532
+ showIf: { field: 'owners', equals: 'pick' },
533
+ },
534
+ /**
535
+ * Read when `owners` is Cast or All. Always shown: `showIf` holds one
536
+ * `equals`, and hiding it under All would hide what All reads.
537
+ */
538
+ castScope: {
539
+ type: 'enum',
540
+ label: 'Which cast members',
541
+ description: 'With Cast or All: Scene shows whoever has a stat in play; All ' +
542
+ 'shows every cast member.',
543
+ of: ['scene', 'all'],
544
+ members: [
545
+ { key: 'scene', label: 'Scene' },
546
+ { key: 'all', label: 'All' },
547
+ ],
548
+ default: 'scene',
549
+ },
550
+ slots: {
551
+ type: 'enum',
552
+ label: 'Stats',
553
+ description: 'Every stat an owner carries; Bars, only the numbers with a ' +
554
+ 'floor and a ceiling (a HUD); or the ones you name.',
555
+ of: ['all', 'bars', 'pick'],
556
+ members: [
557
+ { key: 'all', label: 'All' },
558
+ { key: 'bars', label: 'Bars' },
559
+ { key: 'pick', label: 'Pick' },
560
+ ],
561
+ default: 'all',
562
+ },
563
+ pickSlots: {
564
+ type: 'string[]',
565
+ label: 'Which stats',
566
+ description: "One name per line, as the stat is labelled ('hp').",
567
+ default: [],
568
+ showIf: { field: 'slots', equals: 'pick' },
569
+ },
570
+ arrangement: {
571
+ type: 'enum',
572
+ label: 'Arrangement',
573
+ description: 'Cards draws a card per owner; List one labelled row per stat ' +
574
+ 'down a column; Strip one line across the top of the messages.',
575
+ of: ['cards', 'list', 'strip'],
576
+ members: [
577
+ { key: 'cards', label: 'Cards' },
578
+ { key: 'list', label: 'List' },
579
+ { key: 'strip', label: 'Strip' },
580
+ ],
581
+ default: 'cards',
582
+ },
583
+ density: {
584
+ type: 'enum',
585
+ label: 'Density',
586
+ description: 'Full draws a labelled row per stat; Compact fits them on ' +
587
+ 'as few lines as the card allows.',
588
+ of: ['compact', 'full'],
589
+ members: [
590
+ { key: 'compact', label: 'Compact' },
591
+ { key: 'full', label: 'Full' },
592
+ ],
593
+ default: 'full',
594
+ },
595
+ /**
596
+ * 🚧 The **stat trail** (PLAN-core-widgets §3.10, F2): a button
597
+ * beside each stat opens the changes that led to its value, by
598
+ * message (`stat-trail`). Anyone in the session may read it.
599
+ */
600
+ trail: {
601
+ type: 'boolean',
602
+ label: 'Show changes',
603
+ description: 'A button beside each stat lists how it changed in this ' +
604
+ 'session: what it was, what it became, and who changed it.',
605
+ default: true,
606
+ group: 'behaviour',
607
+ },
608
+ },
609
+ },
610
+ /**
611
+ * ⏳ World State — Stats drawn for the world as a strip, now an ALIAS of
612
+ * `stats` (`WIDGET_ID_ALIASES`, W7 2026-10-11): every reader resolves a
613
+ * placed `world-state` to Stats with `owners: world, arrangement: strip`,
614
+ * so nothing mounts this declaration, and no tray offers it. It stays
615
+ * declared for one release only so its `widget_styles` rows are not
616
+ * pruned as undeclared (`syncWidgetStyles`' `pruneUndeclared`) and its
617
+ * module still serves at `/core-ui/world-state` (a thin wrapper of
618
+ * Stats). Its settings are the ones a stored row may still hold; the
619
+ * settings reader reads `layout` as Stats' `arrangement`.
620
+ * @deprecated REMOVE in 0.7.0 — place `stats#world` with `owners: 'world'`
621
+ * and `arrangement: 'strip'`.
622
+ */
623
+ {
624
+ id: 'world-state',
625
+ title: 'World State',
626
+ icon: 'CloudSun',
627
+ component: 'world-state',
628
+ layout: { span: { ideal: 2 }, minInline: 240, minBlock: 60 },
629
+ /** The session's state (R72): the world owner's slots and values — never the log. */
630
+ scopes: ['session:state'],
631
+ reads: ['settings'],
632
+ presets: [DEFAULT_PRESET],
633
+ settings: {
634
+ slots: {
635
+ type: 'enum',
636
+ label: 'Stats',
637
+ description: "Every one of the world's stats, or the ones you name.",
638
+ of: ['all', 'pick'],
639
+ members: [
640
+ { key: 'all', label: 'All' },
641
+ { key: 'pick', label: 'Pick' },
642
+ ],
643
+ default: 'all',
644
+ },
645
+ pickSlots: {
646
+ type: 'string[]',
647
+ label: 'Which stats',
648
+ description: "One name per line, as the stat is labelled ('weather').",
649
+ default: [],
650
+ showIf: { field: 'slots', equals: 'pick' },
651
+ },
652
+ layout: {
653
+ type: 'enum',
654
+ label: 'Layout',
655
+ description: 'A strip reads across the top of the messages; a list ' +
656
+ 'reads down a side column.',
657
+ of: ['strip', 'list'],
658
+ members: [
659
+ { key: 'strip', label: 'Strip' },
660
+ { key: 'list', label: 'List' },
661
+ ],
662
+ default: 'strip',
663
+ },
664
+ },
665
+ },
666
+ /**
667
+ * 🚧 Turn order (PLAN-core-widgets W1, 2026-10-10): whose turn it is, who
668
+ * follows, and — where the viewer may — Continue and Pick who speaks. The
669
+ * session's stored order (`turnOrder.v1`) drawn as a list to look at:
670
+ * the head line means what the composer's *Who is due next* line means
671
+ * (the same `order[0]`, the same words), then a row per prepared turn
672
+ * with its chip (*Due* · *Then* · *You*), then the two controls and the
673
+ * strategy in force. Unlike the composer's line it never hides while a
674
+ * draft exists — it is for looking while someone else writes.
675
+ *
676
+ * Faces and "you" come from the cast (`characters`); who may press comes
677
+ * from the session's own turn controls (`actions.v1`, `core#advance` /
678
+ * `core#pick`) where the genre lists them, else from `viewer.v1`. A
679
+ * control the viewer may not press is greyed with its reason, never
680
+ * hidden. One per layout: a second copy would show the same thing.
681
+ */
682
+ {
683
+ id: 'turn-order',
684
+ title: 'Turn order',
685
+ icon: 'ListOrdered',
686
+ component: 'turn-order',
687
+ layout: { span: { ideal: 1 }, minInline: 220 },
688
+ /** Faces, names and `mine` — the cast, cascaded (R76). */
689
+ scopes: ['characters'],
690
+ reads: ['turnOrder', 'viewer', 'actions', 'settings', 'locale'],
691
+ maxInstances: 1,
692
+ presets: [DEFAULT_PRESET],
693
+ settings: {
694
+ faces: {
695
+ type: 'boolean',
696
+ label: 'Faces',
697
+ description: "Draw each speaker's face beside their name.",
698
+ default: true,
699
+ },
700
+ showStrategy: {
701
+ type: 'boolean',
702
+ label: 'Show the strategy',
703
+ description: 'Name the strategy that set the order (Round robin, Manual, …) under the controls.',
704
+ default: true,
705
+ group: 'behaviour',
706
+ },
707
+ /**
708
+ * 🚧 W6 (2026-10-11): `characters.v1` lists a benched character
709
+ * (`benched: true`) since the Scene Portraits uplift, so the
710
+ * plan's setting is drawable now.
711
+ */
712
+ showBenched: {
713
+ type: 'boolean',
714
+ label: 'Show benched characters',
715
+ description: 'List the characters switched off in Participants under the order.',
716
+ default: false,
717
+ group: 'behaviour',
718
+ },
719
+ },
720
+ },
721
+ /**
722
+ * 🚧 Actions (PLAN-core-widgets W8, 2026-10-11): what can I do right now.
723
+ * The session's listed actions (`actions.v1`) as real buttons, each with
724
+ * its icon and name, in three groups taken from fields the listing
725
+ * carries — the **turn controls** (the `extra` venue: Continue, Pick who
726
+ * speaks, Regenerate, …), then the **genre's** own (the `composer`
727
+ * venue), then the **added** ones (`origin: 'foreign'` — another
728
+ * namespace's, switched on for this genre). A press is `invoke`, so an
729
+ * action that collects text or recipients opens the page's collect modal
730
+ * exactly as its chip does. A greyed action keeps its reason as its
731
+ * title, in the chips' words (`paletteRowState`), never hidden.
732
+ *
733
+ * Not the composer's Actions disclosure: that row is about the line being
734
+ * written and folds away; this stays up while someone else writes, and
735
+ * `size: large` is the tile grid a phone needs for a long list.
736
+ *
737
+ * ⚠ `showWaiting` is declared, not drawn: the questions put to the
738
+ * viewer's characters (a message's forms) reach no section this widget
739
+ * reads — the forms ride `messages.v1` and who may answer one is the
740
+ * conversation dossier's word.
741
+ */
742
+ {
743
+ id: 'actions',
744
+ title: 'Actions',
745
+ icon: 'MousePointerClick',
746
+ component: 'actions',
747
+ layout: { span: { ideal: 1 }, minInline: 220 },
748
+ reads: ['actions', 'settings', 'locale'],
749
+ maxInstances: 1,
750
+ presets: [DEFAULT_PRESET],
751
+ settings: {
752
+ groups: {
753
+ type: 'enum',
754
+ label: 'Show',
755
+ description: 'Every group, or one alone: the turn controls, the genre\'s own ' +
756
+ 'actions, or the actions added to it from outside.',
757
+ of: ['all', 'turn', 'genre', 'foreign'],
758
+ members: [
759
+ { key: 'all', label: 'All' },
760
+ { key: 'turn', label: 'Turn controls' },
761
+ { key: 'genre', label: 'Genre actions' },
762
+ { key: 'foreign', label: 'Added actions' },
763
+ ],
764
+ default: 'all',
765
+ },
766
+ size: {
767
+ type: 'enum',
768
+ label: 'Size',
769
+ description: 'Compact draws chips that wrap; Large draws a grid of tiles ' +
770
+ 'a finger lands on easily.',
771
+ of: ['compact', 'large'],
772
+ members: [
773
+ { key: 'compact', label: 'Compact' },
774
+ { key: 'large', label: 'Large' },
775
+ ],
776
+ default: 'compact',
777
+ },
778
+ showWaiting: {
779
+ type: 'boolean',
780
+ label: 'Show what waits on you',
781
+ description: 'List the questions put to your characters that wait for your ' +
782
+ 'answer. Not drawn yet: the widget cannot see them.',
783
+ default: true,
784
+ group: 'behaviour',
785
+ },
786
+ },
787
+ },
788
+ /**
789
+ * 🚧 Annex (PLAN-core-widgets W9, 2026-10-11): what the pipeline knows
790
+ * that the viewer may see — one declared annex key, by its label, in the
791
+ * shape it was declared in. The `key` setting names it as a template
792
+ * does, `<owner>.<key>`. It draws the viewer's own view of the annex
793
+ * (`annex.v1`), never the annex itself, so a key whose `see` audience
794
+ * leaves the viewer out is never drawn. Text is prose, a number or a
795
+ * choice one row, a list chips, an object a row per member.
796
+ *
797
+ * The field's label and whether the viewer may set it are the host's,
798
+ * from its listing (`actions.v1`): a settable field is one action at the
799
+ * `widget` venue, `<owner>:annex#<key>`, named by its label and judged
800
+ * for the viewer. A text field the viewer may set has the Session data
801
+ * list's Edit, which presses that action with `{ value }` — the same
802
+ * door, the same write.
803
+ *
804
+ * ⚠ Neither the declared shape nor the `see` verdict reaches a widget
805
+ * yet: a field nobody may set is titled by its key and drawn by its
806
+ * value's own form, and a key the viewer may not see reads as *Nothing
807
+ * written yet*. The settings sheet offers no list of the keys (the
808
+ * field language has no options-from-the-session); the key is typed.
809
+ */
810
+ {
811
+ id: 'annex',
812
+ title: 'Annex',
813
+ icon: 'ClipboardList',
814
+ component: 'annex',
815
+ layout: { span: { ideal: 1 }, minInline: 220 },
816
+ reads: ['annex', 'actions', 'viewer', 'settings', 'locale'],
817
+ presets: [DEFAULT_PRESET],
818
+ settings: {
819
+ key: {
820
+ type: 'string',
821
+ label: 'Key',
822
+ description: 'The annex key to show, written as its owner, a dot, then the key: ' +
823
+ "core.retake-quietly, or a plugin's acme.dice.last-roll. Edit session › " +
824
+ 'Settings › Session data lists every key under its owner.',
825
+ default: '',
826
+ },
827
+ showLabel: {
828
+ type: 'boolean',
829
+ label: 'Show the label',
830
+ description: "Draw the field's label above its value.",
831
+ default: false,
832
+ },
833
+ },
834
+ },
835
+ /**
836
+ * 🚧 Album (PLAN-core-widgets W2, 2026-10-11): what has this session
837
+ * shown me — every picture on its lines (`messages.v1` rows' `core:image`
838
+ * parts, the shown revision), newest line first, each a square tile with
839
+ * a corner glyph for where it came from: **attached** by a person (a
840
+ * person's line) or **generated** by a run (any other line). Hover or
841
+ * focus names who showed it and when; a press opens the page's lightbox
842
+ * (`view-image`) with the whole album as its pages, in the order drawn.
843
+ * `arrangement: latest` draws the newest large and the rest as a strip,
844
+ * so an illustrated scene sits beside the log as it is generated.
845
+ *
846
+ * ⚠ Not a **gallery** (a character's or persona's own image set) — the
847
+ * word stays theirs (R1) — not the **media strip** (one message's files,
848
+ * under its card), and not the **Media** collection. Its tile is its own
849
+ * (`album.tile`), drawn like the strip's: the strip's tile is markup
850
+ * inside the conversation, not yet a shared control.
851
+ *
852
+ * ⚠ The caption does not jump to its line: a fragment link from this box
853
+ * is prefixed into the box (`guardedConnection`, every box but the
854
+ * conversation holding the page's ids), so `#message-<id>` cannot reach
855
+ * the log's anchor, and `selection:changed` has no producer yet.
856
+ */
857
+ {
858
+ id: 'album',
859
+ title: 'Album',
860
+ icon: 'BookImage',
861
+ component: 'album',
862
+ layout: { span: { ideal: 1 }, minInline: 200 },
863
+ reads: ['messages', 'settings', 'locale'],
864
+ presets: [DEFAULT_PRESET],
865
+ settings: {
866
+ source: {
867
+ type: 'enum',
868
+ label: 'Show',
869
+ description: 'Every picture, or only what people attached, or only what was generated.',
870
+ of: ['all', 'attached', 'generated'],
871
+ members: [
872
+ { key: 'all', label: 'Everything' },
873
+ { key: 'attached', label: 'Attached' },
874
+ { key: 'generated', label: 'Generated' },
875
+ ],
876
+ default: 'all',
877
+ },
878
+ tile: {
879
+ type: 'enum',
880
+ label: 'Tile size',
881
+ of: ['small', 'medium', 'large'],
882
+ members: [
883
+ { key: 'small', label: 'Small' },
884
+ { key: 'medium', label: 'Medium' },
885
+ { key: 'large', label: 'Large' },
886
+ ],
887
+ default: 'medium',
888
+ },
889
+ arrangement: {
890
+ type: 'enum',
891
+ label: 'Arrangement',
892
+ description: 'Grid draws every picture the same size; Newest large draws the ' +
893
+ 'newest picture big, with the rest as a strip beneath it.',
894
+ of: ['grid', 'latest'],
895
+ members: [
896
+ { key: 'grid', label: 'Grid' },
897
+ { key: 'latest', label: 'Newest large' },
898
+ ],
899
+ default: 'grid',
900
+ },
901
+ /**
902
+ * One channel's pictures (the Messages widget's `channel`, read
903
+ * the same way: a slug, every lane of it). Empty is every
904
+ * channel: an album takes no line from a log, so no copy's claim
905
+ * narrows it.
906
+ */
907
+ channel: {
908
+ type: 'string',
909
+ label: 'Channel',
910
+ description: "Show one channel's pictures only, by its slug (the Lair's is sanctum). " +
911
+ 'Empty shows every channel.',
912
+ group: 'behaviour',
913
+ },
914
+ },
915
+ },
916
+ /**
917
+ * 🚧 Backdrop (DESIGN-image-generation §6.4, ruling §9.4; 2026-10-12):
918
+ * the session's **backdrop** — one picture, session state
919
+ * (`sessions.backdropMediaId`), set by a pipeline
920
+ * (`core:outlet/set-backdrop@1`) or by a person here. It reads the
921
+ * `session` section (`SessionV1.backdrop`, the host's `fitted` address),
922
+ * draws it fitted under a darkening overlay, and offers the session's
923
+ * owner or an admin **Change** (a cast member's gallery, paged by
924
+ * `character-images` — Scene Portraits' chooser request, so it holds
925
+ * `characters`) and **Clear** (`set-backdrop`). **Illustrate** fires
926
+ * the Scene action (`actions`) with `{ placement: 'backdrop' }` (I9).
927
+ *
928
+ * ⚠ Not the app background (a person's own, behind every screen), not a
929
+ * message attachment, and not the retired *scene image* pins.
930
+ */
931
+ {
932
+ id: 'backdrop',
933
+ title: 'Backdrop',
934
+ icon: 'MountainSnow',
935
+ component: 'backdrop',
936
+ layout: { span: { ideal: 1 }, minInline: 200 },
937
+ scopes: ['characters'],
938
+ // `actions`: the Scene action, for **Illustrate** (I9).
939
+ reads: ['session', 'settings', 'locale', 'viewer', 'actions'],
940
+ presets: [DEFAULT_PRESET],
941
+ settings: {
942
+ fit: {
943
+ type: 'enum',
944
+ label: 'Fit',
945
+ description: 'Fill the box and crop the edges, or show the whole picture.',
946
+ of: ['cover', 'contain'],
947
+ members: [
948
+ { key: 'cover', label: 'Fill' },
949
+ { key: 'contain', label: 'Whole picture' },
950
+ ],
951
+ default: 'cover',
952
+ },
953
+ /** A darkening overlay, so text laid over the picture stays legible. */
954
+ dim: {
955
+ type: 'integer',
956
+ label: 'Dim',
957
+ description: 'Darken the picture so text over it is easier to read. 0 is none, 100 is black.',
958
+ min: 0,
959
+ max: 100,
960
+ default: 0,
961
+ },
962
+ },
963
+ },
964
+ /**
965
+ * 🚧 Chronicle (PLAN-core-widgets W3, 2026-10-11): when are we in the
966
+ * story, and what has the lorebook recorded of this session. Top to
967
+ * bottom: the session's **story clock** (its own, or its line's present
968
+ * it follows — with **Next day** / **Move the clock…** / **Follow the
969
+ * line's present** for the session's owner, and a chip when its own
970
+ * clock stands before its line's present); **Now**, the history entry
971
+ * the session reads on its line up to its clock, with **Open in
972
+ * lorebook** and **Start new history entry**; that entry's scenes from
973
+ * this session, with **Summarize scene** and **Extend graph (N)**; and
974
+ * **Earlier**, the entries before it, folded. It is the composer's Lore
975
+ * pane's history half, moved (Q3): the pane keeps what the next reply
976
+ * would pull in and the entries that have come up.
977
+ *
978
+ * Everything is asked of the page (`history-entries`, `set-story-clock`,
979
+ * `start-history-entry`, `extend-graph`, `summarize`, `open-lore`); the
980
+ * declared `lore` scope is the grant for the read, and `story:moved`
981
+ * tells it to ask again. A guest reads the clock alone: the entries and
982
+ * scenes are the lorebook owner's.
983
+ *
984
+ * ⚠ Not a **history entry** (one dated row it lists), not a **scene**,
985
+ * and not the **story clock** (the value its head shows). A genre with
986
+ * no lorebook omits it (Dungeon Crawler, when it lands).
987
+ */
988
+ {
989
+ id: 'chronicle',
990
+ title: 'Chronicle',
991
+ icon: 'Calendar',
992
+ component: 'chronicle',
993
+ layout: { span: { ideal: 1 }, minInline: 260 },
994
+ /** The grant `history-entries` reads with — nothing is pushed. */
995
+ scopes: ['lore'],
996
+ reads: ['settings', 'viewer', 'session'],
997
+ presets: [DEFAULT_PRESET],
998
+ settings: {
999
+ clock: {
1000
+ type: 'boolean',
1001
+ label: 'Show the story clock',
1002
+ description: "Draw where the session stands in its story, and its owner's controls to move it.",
1003
+ default: true,
1004
+ },
1005
+ earlierCount: {
1006
+ type: 'integer',
1007
+ label: 'Earlier entries shown',
1008
+ description: 'How many history entries before the current one the Earlier list shows.',
1009
+ default: 10,
1010
+ min: 5,
1011
+ max: 50,
1012
+ group: 'behaviour',
1013
+ },
1014
+ },
1015
+ },
1016
+ /**
1017
+ * 🚧 Places (PLAN-core-widgets W4, 2026-10-11): where are we, what is
1018
+ * around us, where can we go. The session's places — its lorebook's
1019
+ * `core:entry/location` entries on its line, at its story clock, a place
1020
+ * switched off or archived by then left out, a renamed one by its name
1021
+ * then — as a **list** (name, category tint, the faces of the cast who
1022
+ * stand there, its ways out; the world's `location` marked **Here**; a
1023
+ * press opens the entry) or a **map** (the shared **map canvas**:
1024
+ * squares tinted by category, arrows for ways — an arrowhead at each end
1025
+ * when a way reads both ways — faces on squares, **Here** ringed; a
1026
+ * press opens the place's detail: its ways said from it, what the book
1027
+ * links to it, who is here, its stats, **Open entry**).
1028
+ *
1029
+ * The places and ways are asked of the page (`session-places`, under the
1030
+ * `lore` grant); who stands where is the session's state, read from
1031
+ * `session_state.v1` (each owner's `location`). The Lair's right column
1032
+ * (list, both picked out) and Adventure's tray place it; every core
1033
+ * genre with a lorebook offers it.
1034
+ *
1035
+ * ⚠ Not the lorebook's **Places lens** (where places and ways are made),
1036
+ * not **Stats** (which draws a place's stats as cards), and never titled
1037
+ * *Map*: Dungeon Crawler's `crawl-map` is *Map* in its genre.
1038
+ */
1039
+ {
1040
+ id: 'places',
1041
+ title: 'Places',
1042
+ icon: 'Map',
1043
+ component: 'places',
1044
+ layout: { span: { ideal: 2 }, minInline: 260, minBlock: 120 },
1045
+ /** The grant `session-places` reads with, and the state who stands where is read from. */
1046
+ scopes: ['lore', 'session:state'],
1047
+ reads: ['settings'],
1048
+ presets: [DEFAULT_PRESET],
1049
+ settings: {
1050
+ view: {
1051
+ type: 'enum',
1052
+ label: 'View',
1053
+ description: 'A list of the places, or a map of them with their ways drawn between.',
1054
+ of: ['list', 'map'],
1055
+ members: [
1056
+ { key: 'list', label: 'List' },
1057
+ { key: 'map', label: 'Map' },
1058
+ ],
1059
+ default: 'list',
1060
+ },
1061
+ highlight: {
1062
+ type: 'enum',
1063
+ label: 'Pick out',
1064
+ description: "Where the scene is (the world's location, marked Here), where the " +
1065
+ 'cast stand (their faces on the place), or both.',
1066
+ of: ['world', 'cast', 'both'],
1067
+ members: [
1068
+ { key: 'world', label: 'Where the scene is' },
1069
+ { key: 'cast', label: 'Where the cast stand' },
1070
+ { key: 'both', label: 'Both' },
1071
+ ],
1072
+ default: 'both',
1073
+ },
1074
+ categories: {
1075
+ type: 'string[]',
1076
+ label: 'Categories',
1077
+ description: "One category per line, as the places are filed ('Upper floor'). Empty shows every place.",
1078
+ default: [],
1079
+ group: 'behaviour',
1080
+ },
1081
+ showWays: {
1082
+ type: 'boolean',
1083
+ label: 'Show ways out',
1084
+ description: "Write each place's ways out under its name in the list, and in a place's detail.",
1085
+ default: true,
1086
+ group: 'behaviour',
1087
+ },
1088
+ },
1089
+ },
1090
+ /**
1091
+ * 🚧 Who's here (PLAN-core-widgets W10, 2026-10-11): which people have
1092
+ * this session open now, as whom each writes, and who is typing. The
1093
+ * session's **attendance** (`attendance.v1`, a base section) drawn as two
1094
+ * groups: **Here** — a row per person with the session open (their
1095
+ * name, *you* on the viewer's own, the persona each writes as with its
1096
+ * face, a typing pulse, and *Owner* / *Guest* as a quiet chip) — and
1097
+ * **Away** — the session's other members, with when they were last here.
1098
+ * A press on a persona opens its sheet (`open-character`).
1099
+ *
1100
+ * Who is here is the host's word: a person whose tab holds the session
1101
+ * open, in any tab. The faces come from the cast (`characters`). One per
1102
+ * layout: a second copy would show the same people. Every genre offers it.
1103
+ *
1104
+ * ⚠ Not a cast **presence** (a cast member's dated span in the world):
1105
+ * these are the session's people — its owner and guests — not its cast.
1106
+ */
1107
+ {
1108
+ id: 'attendance',
1109
+ title: "Who's here",
1110
+ icon: 'Users',
1111
+ component: 'attendance',
1112
+ layout: { span: { ideal: 1 }, minInline: 220 },
1113
+ /** The personas' faces and names, by the refs the attendance names (R76). */
1114
+ scopes: ['characters'],
1115
+ reads: ['attendance', 'viewer', 'settings'],
1116
+ maxInstances: 1,
1117
+ presets: [DEFAULT_PRESET],
1118
+ settings: {
1119
+ showAway: {
1120
+ type: 'boolean',
1121
+ label: 'Show who is away',
1122
+ description: 'List the people with a seat who do not have the session open, with when they were last here.',
1123
+ default: true,
1124
+ group: 'behaviour',
1125
+ },
1126
+ faces: {
1127
+ type: 'boolean',
1128
+ label: 'Faces',
1129
+ description: "Draw each persona's face beside its name.",
1130
+ default: true,
1131
+ },
1132
+ },
1133
+ },
1134
+ /**
1135
+ * 🚧 The author's note (2026-10-02, AN1; owner ruling: Chat only): the
1136
+ * session's own note to the model, edited and saved here, with what the
1137
+ * newest reply did with it. It reads no section — the note, who may
1138
+ * change it and the last reply's verdict are all asked of the page
1139
+ * (`authors-note`, `set-authors-note`). Offered by Chat alone among core's
1140
+ * genres (the others omit it); in a plugin genre that declares no note it
1141
+ * says so in one line. Chat's default layout places it, unpinned, in the
1142
+ * right rail (owner ruling 2026-10-03; `CHAT_LAYOUT`).
1143
+ */
1144
+ {
1145
+ id: 'authors-note',
1146
+ title: "Author's note",
1147
+ icon: 'NotebookPen',
1148
+ component: 'authors-note',
1149
+ layout: { span: { ideal: 1 }, minInline: 240 },
1150
+ reads: [],
1151
+ presets: [DEFAULT_PRESET],
1152
+ },
1153
+ ];
1154
+ // Core's widgets are core's (R71): a genre naming one by value names its bare id.
1155
+ ownWidgets('core', CORE_WIDGETS);
1156
+ const coreWidget = (id) => {
1157
+ const w = CORE_WIDGETS.find((x) => x.id === id);
1158
+ if (!w)
1159
+ throw new Error(`core declares no widget '${id}'`);
1160
+ return w;
1161
+ };
1162
+ /**
1163
+ * Core's widgets as values (R71) — what a genre names in `omitWidgets` or a
1164
+ * layout, and what a package's clone replaces.
1165
+ * @public
1166
+ */
1167
+ export const coreWidgets = {
1168
+ /** The log and the field you write into — the middle of every genre that keeps it. */
1169
+ conversation: coreWidget('messages'),
1170
+ scenePortraits: coreWidget('scene-portraits'),
1171
+ loreEntries: coreWidget('lore-entries'),
1172
+ /** Stats (W7): the world's, the cast's and the places' stats — as cards, a list or a strip. */
1173
+ stats: coreWidget('stats'),
1174
+ /**
1175
+ * ⏳ World State is Stats now (`WIDGET_ID_ALIASES`): a layout naming it
1176
+ * draws Stats with `owners: 'world', arrangement: 'strip'`.
1177
+ * @deprecated REMOVE in 0.7.0 — place `stats#world` with those settings.
1178
+ */
1179
+ worldState: coreWidget('world-state'),
1180
+ /** 🚧 The author's note (AN1) — Chat's; the other core genres omit it. */
1181
+ authorsNote: coreWidget('authors-note'),
1182
+ /** 🚧 Turn order (W1): whose turn it is, who follows, Continue and Pick who speaks. */
1183
+ turnOrder: coreWidget('turn-order'),
1184
+ /** 🚧 Actions (W8): the session's actions as buttons — turn controls, the genre's, the added. */
1185
+ actions: coreWidget('actions'),
1186
+ /** 🚧 Annex (W9): one declared annex key, by its label, as the viewer may see it. */
1187
+ annex: coreWidget('annex'),
1188
+ /** 🚧 Album (W2): every picture on the session's lines, newest first; the lightbox pages them all. */
1189
+ album: coreWidget('album'),
1190
+ /** 🚧 Backdrop: the session's backdrop picture, with Change and Clear for its owner. */
1191
+ backdrop: coreWidget('backdrop'),
1192
+ /** 🚧 Chronicle (W3): the session's story clock, the history entry it reads now with its scenes, and the entries before. */
1193
+ chronicle: coreWidget('chronicle'),
1194
+ /** 🚧 Places (W4): the session's places as a list or a map — where the scene is, who stands where, the ways between. */
1195
+ places: coreWidget('places'),
1196
+ /** 🚧 Who's here (W10): the session's people — who has it open, as whom each writes, who is typing, who is away. */
1197
+ attendance: coreWidget('attendance'),
1198
+ };
1199
+ /**
1200
+ * Core's components (C6 P1), declared through the public API as a package
1201
+ * declares its own (R26): one per core widget's `component`, its source
1202
+ * under this package's `components/`. The build compiles them into
1203
+ * `dist/components/<slug>.js` (served at `/core-ui/<slug>`) and writes each
1204
+ * one's source beside it, `dist/components/<slug>.source.json`, which an
1205
+ * admin views, clones and diffs against — a clone's `basedOn` names the
1206
+ * slug, this package's version and that file's `sourceHash`.
1207
+ * @experimental
1208
+ */
1209
+ export const CORE_COMPONENTS = [
1210
+ component({ slug: 'messages', label: 'Messages', entry: 'components/shared/messages/messages.ts', framework: 'svelte' }),
1211
+ // ⏳ REMOVE in 0.7.0 with the `world-state` declaration: a thin wrapper of
1212
+ // Stats in World State's settings, kept so `/core-ui/world-state` serves.
1213
+ component({
1214
+ slug: 'world-state',
1215
+ label: 'World State',
1216
+ entry: 'components/shared/world-state/world-state.ts',
1217
+ framework: 'svelte',
1218
+ }),
1219
+ component({ slug: 'stats', label: 'Stats', entry: 'components/shared/stats/stats.ts', framework: 'svelte' }),
1220
+ component({
1221
+ slug: 'lore-entries',
1222
+ label: 'Lore entries',
1223
+ entry: 'components/shared/lore-entries/lore-entries.ts',
1224
+ framework: 'svelte',
1225
+ }),
1226
+ component({
1227
+ slug: 'scene-portraits',
1228
+ label: 'Scene Portraits',
1229
+ entry: 'components/shared/scene-portraits/scene-portraits.ts',
1230
+ framework: 'svelte',
1231
+ }),
1232
+ component({
1233
+ slug: 'authors-note',
1234
+ label: "Author's note",
1235
+ entry: 'components/genres/chat/authors-note/authors-note.ts',
1236
+ framework: 'svelte',
1237
+ }),
1238
+ component({
1239
+ slug: 'turn-order',
1240
+ label: 'Turn order',
1241
+ entry: 'components/shared/turn-order/turn-order.ts',
1242
+ framework: 'svelte',
1243
+ }),
1244
+ component({
1245
+ slug: 'actions',
1246
+ label: 'Actions',
1247
+ entry: 'components/shared/actions/actions.ts',
1248
+ framework: 'svelte',
1249
+ }),
1250
+ component({
1251
+ slug: 'annex',
1252
+ label: 'Annex',
1253
+ entry: 'components/shared/annex/annex.ts',
1254
+ framework: 'svelte',
1255
+ }),
1256
+ component({
1257
+ slug: 'album',
1258
+ label: 'Album',
1259
+ entry: 'components/shared/album/album.ts',
1260
+ framework: 'svelte',
1261
+ }),
1262
+ component({
1263
+ slug: 'backdrop',
1264
+ label: 'Backdrop',
1265
+ entry: 'components/shared/backdrop/backdrop.ts',
1266
+ framework: 'svelte',
1267
+ }),
1268
+ component({
1269
+ slug: 'chronicle',
1270
+ label: 'Chronicle',
1271
+ entry: 'components/shared/chronicle/chronicle.ts',
1272
+ framework: 'svelte',
1273
+ }),
1274
+ component({
1275
+ slug: 'places',
1276
+ label: 'Places',
1277
+ entry: 'components/shared/places/places.ts',
1278
+ framework: 'svelte',
1279
+ }),
1280
+ component({
1281
+ slug: 'attendance',
1282
+ label: "Who's here",
1283
+ entry: 'components/shared/attendance/attendance.ts',
1284
+ framework: 'svelte',
1285
+ }),
1286
+ ];
1287
+ /**
1288
+ * Core components an admin may read but not clone (C6 Q3): `messages` runs
1289
+ * on core's trust — no invoke gate, unprefixed `#message-<id>` ids for j/k
1290
+ * — which a clone, never mounted as core, cannot have.
1291
+ * @experimental
1292
+ */
1293
+ export const CORE_VIEW_ONLY_COMPONENTS = ['messages'];
1294
+ //# sourceMappingURL=widgets.js.map