@serene-pub/core-catalog 0.6.0-pr-7 → 0.6.0-pr-9
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.
- package/README.md +1 -1
- package/components/genres/story/authors-note/AuthorsNote.svelte +2 -1
- package/components/genres/story/authors-note/AuthorsNoteWidget.svelte +177 -58
- package/components/shared/WidgetBoundary.svelte +37 -0
- package/components/shared/actions/Actions.svelte +2 -1
- package/components/shared/actions/ActionsWidget.svelte +31 -38
- package/components/shared/album/Album.svelte +2 -1
- package/components/shared/album/AlbumWidget.svelte +1 -7
- package/components/shared/annex/Annex.svelte +2 -1
- package/components/shared/annex/AnnexWidget.svelte +1 -1
- package/components/shared/attendance/Attendance.svelte +2 -1
- package/components/shared/attendance/AttendanceWidget.svelte +5 -8
- package/components/shared/backdrop/Backdrop.svelte +2 -1
- package/components/shared/backdrop/BackdropWidget.svelte +28 -22
- package/components/shared/chronicle/Chronicle.svelte +2 -1
- package/components/shared/chronicle/ChronicleWidget.svelte +211 -99
- package/components/shared/composer/Composer.svelte +25 -0
- package/components/shared/composer/ComposerWidget.svelte +146 -0
- package/components/shared/composer/composer.ts +10 -0
- package/components/shared/composer/settings.ts +59 -0
- package/components/shared/composer/target.ts +79 -0
- package/components/shared/dialogue-box/DialogueBoxMount.svelte +25 -0
- package/components/shared/dialogue-box/DialogueBoxWidget.svelte +207 -0
- package/components/shared/dialogue-box/dialogue-box.ts +10 -0
- package/components/shared/dialogue-box/settings.ts +25 -0
- package/components/shared/lore-entries/LoreEntries.svelte +2 -1
- package/components/shared/lore-entries/LoreEntriesWidget.svelte +44 -41
- package/components/shared/messages/MessageBlocksView.svelte +1 -1
- package/components/shared/messages/MessageControls.svelte +23 -5
- package/components/shared/messages/Messages.svelte +2 -1
- package/components/shared/messages/MessagesWidget.svelte +82 -191
- package/components/shared/messages/NextCharacterBlock.svelte +35 -20
- package/components/shared/messages/SceneDivider.svelte +40 -14
- package/components/shared/messages/SessionComposer.svelte +178 -123
- package/components/shared/messages/SessionContainer.svelte +89 -38
- package/components/shared/messages/SessionMessage.svelte +157 -54
- package/components/shared/messages/SpokenLine.svelte +57 -16
- package/components/shared/messages/StateProposalList.svelte +30 -20
- package/components/shared/messages/TurnLine.svelte +258 -66
- package/components/shared/messages/conversation.svelte.ts +83 -5
- package/components/shared/messages/readingPace.ts +101 -0
- package/components/shared/messages/rowFacts.ts +44 -0
- package/components/shared/messages/sceneMarks.ts +54 -0
- package/components/shared/messages/spokenLine.ts +63 -14
- package/components/shared/places/Places.svelte +2 -1
- package/components/shared/places/PlacesWidget.svelte +42 -33
- package/components/shared/routine-log/RoutineLog.svelte +2 -1
- package/components/shared/routine-log/RoutineLogWidget.svelte +0 -4
- package/components/shared/routine-log/routineLog.ts +5 -21
- package/components/shared/scene-portraits/ScenePortraits.svelte +2 -1
- package/components/shared/scene-portraits/ScenePortraitsWidget.svelte +54 -32
- package/components/shared/session-runs/SessionRuns.svelte +26 -0
- package/components/shared/session-runs/SessionRunsWidget.svelte +270 -0
- package/components/shared/session-runs/session-runs.ts +11 -0
- package/components/shared/state/PieceCard.svelte +36 -25
- package/components/shared/state/SlotControl.svelte +18 -5
- package/components/shared/stats/Stats.svelte +2 -1
- package/components/shared/stats/StatsWidget.svelte +104 -72
- package/components/shared/turn-line/TurnLineMount.svelte +25 -0
- package/components/shared/turn-line/TurnLineWidget.svelte +25 -0
- package/components/shared/turn-line/settings.ts +31 -0
- package/components/shared/turn-line/turn-line.ts +10 -0
- package/components/shared/turn-order/TurnOrder.svelte +2 -1
- package/components/shared/turn-order/TurnOrderWidget.svelte +1 -6
- package/dist/components/actions.js +71 -88
- package/dist/components/actions.source.json +1 -1
- package/dist/components/album.js +39 -44
- package/dist/components/album.source.json +1 -1
- package/dist/components/annex.js +17 -8
- package/dist/components/annex.source.json +1 -1
- package/dist/components/attendance.js +39 -48
- package/dist/components/attendance.source.json +1 -1
- package/dist/components/authors-note.js +329 -162
- package/dist/components/authors-note.source.json +1 -1
- package/dist/components/backdrop.js +52 -55
- package/dist/components/backdrop.source.json +1 -1
- package/dist/components/chronicle.js +798 -559
- package/dist/components/chronicle.source.json +1 -1
- package/dist/components/composer.js +1639 -0
- package/dist/components/composer.source.json +1 -0
- package/dist/components/core-ui.json +1 -1
- package/dist/components/dialogue-box.js +373 -0
- package/dist/components/dialogue-box.source.json +1 -0
- package/dist/components/lore-entries.js +134 -122
- package/dist/components/lore-entries.source.json +1 -1
- package/dist/components/messages.js +1517 -8930
- package/dist/components/messages.source.json +1 -1
- package/dist/components/places.js +267 -244
- package/dist/components/places.source.json +1 -1
- package/dist/components/routine-log.js +35 -51
- package/dist/components/routine-log.source.json +1 -1
- package/dist/components/scene-portraits.js +118 -59
- package/dist/components/scene-portraits.source.json +1 -1
- package/dist/components/session-runs.js +488 -0
- package/dist/components/session-runs.source.json +1 -0
- package/dist/components/{shared-7VDIXYAL.js → shared-47J4TNSF.js} +1 -1
- package/dist/components/{shared-W3XS5FEL.js → shared-5E4RQYRX.js} +3 -2
- package/dist/components/{shared-YDS7HYL6.js → shared-EFMMT76D.js} +57 -4
- package/dist/components/{shared-BIWKZFUU.js → shared-FOVKPMSK.js} +3 -3
- package/dist/components/{shared-JPG5DQO7.js → shared-HEAKNNZB.js} +92 -17
- package/dist/components/shared-JXP6SHKF.js +159 -0
- package/dist/components/{shared-XBDUENRA.js → shared-JXYPKSTQ.js} +1 -1
- package/dist/components/shared-KJIOSSE3.js +257 -0
- package/dist/components/{shared-WV3QTKZT.js → shared-KLURQFWI.js} +13 -9
- package/dist/components/shared-MHCNUDUT.js +1680 -0
- package/dist/components/{shared-QXF5CJVN.js → shared-NICRJ4Z2.js} +1 -1
- package/dist/components/{shared-BBF64YGL.js → shared-W2BBJCNE.js} +22 -16
- package/dist/components/shared-YYYXFDZU.js +4354 -0
- package/dist/components/stats.js +828 -678
- package/dist/components/stats.source.json +1 -1
- package/dist/components/turn-line.js +856 -0
- package/dist/components/turn-line.source.json +1 -0
- package/dist/components/turn-order.js +62 -67
- package/dist/components/turn-order.source.json +1 -1
- package/dist/factories/answerForm.d.ts +6 -0
- package/dist/factories/answerForm.js +104 -96
- package/dist/factories/turnOrder.d.ts +98 -105
- package/dist/factories/turnOrder.js +120 -136
- package/dist/functions/pieces.js +1 -0
- package/dist/functions/time.js +2 -0
- package/dist/genres/chat/create.js +2 -0
- package/dist/genres/chat/memory.js +64 -43
- package/dist/genres/chat/respond.d.ts +7 -6
- package/dist/genres/chat/respond.js +13 -4
- package/dist/genres/chat/turnOrder.d.ts +2 -2
- package/dist/genres/chat/turnOrder.js +28 -12
- package/dist/genres/defaults.d.ts +28 -6
- package/dist/genres/defaults.js +84 -26
- package/dist/genres/dungeon-crawler/calls.d.ts +3 -1
- package/dist/genres/dungeon-crawler/calls.js +5 -0
- package/dist/genres/dungeon-crawler/create.d.ts +9 -6
- package/dist/genres/dungeon-crawler/create.js +18 -8
- package/dist/genres/dungeon-crawler/death.d.ts +13 -6
- package/dist/genres/dungeon-crawler/death.js +26 -12
- package/dist/genres/dungeon-crawler/index.d.ts +1 -0
- package/dist/genres/dungeon-crawler/index.js +1 -0
- package/dist/genres/dungeon-crawler/journal.d.ts +1 -1
- package/dist/genres/dungeon-crawler/journal.js +1 -1
- package/dist/genres/dungeon-crawler/lore.d.ts +13 -12
- package/dist/genres/dungeon-crawler/lore.js +16 -25
- package/dist/genres/dungeon-crawler/names.d.ts +10 -3
- package/dist/genres/dungeon-crawler/names.js +10 -3
- package/dist/genres/dungeon-crawler/preamble.d.ts +5 -4
- package/dist/genres/dungeon-crawler/preamble.js +75 -33
- package/dist/genres/dungeon-crawler/respond.js +4 -2
- package/dist/genres/dungeon-crawler/rest.d.ts +8 -7
- package/dist/genres/dungeon-crawler/rest.js +39 -15
- package/dist/genres/dungeon-crawler/reveal.js +2 -2
- package/dist/genres/dungeon-crawler/roundScript.d.ts +2 -1
- package/dist/genres/dungeon-crawler/roundScript.js +23 -5
- package/dist/genres/dungeon-crawler/scripts.js +4 -5
- package/dist/genres/dungeon-crawler/shape.d.ts +16 -0
- package/dist/genres/dungeon-crawler/shape.js +5 -1
- package/dist/genres/dungeon-crawler/sheet.d.ts +20 -20
- package/dist/genres/dungeon-crawler/story.d.ts +27 -16
- package/dist/genres/dungeon-crawler/story.js +175 -46
- package/dist/genres/dungeon-crawler/storyScripts.d.ts +2 -2
- package/dist/genres/dungeon-crawler/storyScripts.js +109 -14
- package/dist/genres/dungeon-crawler/summarizeScene.d.ts +13 -0
- package/dist/genres/dungeon-crawler/summarizeScene.js +21 -0
- package/dist/genres/dungeon-crawler/turnOrder.d.ts +8 -9
- package/dist/genres/dungeon-crawler/turnOrder.js +33 -23
- package/dist/genres/guide/create.js +2 -0
- package/dist/genres/guide/turnOrder.d.ts +3 -3
- package/dist/genres/guide/turnOrder.js +29 -13
- package/dist/genres/lair/answerForm.js +4 -1
- package/dist/genres/lair/buildRoom.js +4 -3
- package/dist/genres/lair/castellanAction.js +160 -154
- package/dist/genres/lair/create.js +2 -0
- package/dist/genres/lair/fileCurrentRoom.js +13 -10
- package/dist/genres/lair/fileRoom.js +4 -3
- package/dist/genres/lair/keeper.js +6 -2
- package/dist/genres/lair/names.d.ts +2 -0
- package/dist/genres/lair/names.js +2 -0
- package/dist/genres/lair/reply.js +16 -6
- package/dist/genres/lair/roomAnswer.js +4 -3
- package/dist/genres/lair/scratchpad.js +9 -7
- package/dist/genres/lair/scripts.js +8 -6
- package/dist/genres/lair/turnOrder.d.ts +3 -2
- package/dist/genres/lair/turnOrder.js +45 -16
- package/dist/genres/story/ask.d.ts +4 -0
- package/dist/genres/story/ask.js +4 -0
- package/dist/genres/story/create.js +15 -0
- package/dist/genres/story/index.d.ts +1 -1
- package/dist/genres/story/index.js +1 -1
- package/dist/genres/story/narrate.js +8 -0
- package/dist/genres/story/narrateCharacter.js +8 -0
- package/dist/genres/story/reckon.d.ts +5 -19
- package/dist/genres/story/reckon.js +53 -40
- package/dist/genres/story/reckoning.js +3 -0
- package/dist/genres/story/respond.js +17 -28
- package/dist/genres/story/sweep.d.ts +1 -1
- package/dist/genres/story/sweep.js +1 -1
- package/dist/genres/story/turnOrder.d.ts +21 -3
- package/dist/genres/story/turnOrder.js +87 -21
- package/dist/index.d.ts +3 -0
- package/dist/index.js +23 -9
- package/dist/loadouts.d.ts +1 -0
- package/dist/loadouts.js +17 -1
- package/dist/primers/ninth-mile.d.ts +3 -4
- package/dist/registry/entries.d.ts +2 -0
- package/dist/registry/entries.js +18 -5
- package/dist/registry/genres.d.ts +146 -40
- package/dist/registry/genres.js +373 -101
- package/dist/registry/hostState.d.ts +1 -2
- package/dist/registry/hostState.js +2 -4
- package/dist/registry/layouts.d.ts +141 -111
- package/dist/registry/layouts.js +302 -141
- package/dist/registry/slots.d.ts +4 -3
- package/dist/registry/slots.js +4 -3
- package/dist/registry/widgets.d.ts +12 -2
- package/dist/registry/widgets.js +259 -106
- package/dist/rulesets/vis-itineris/ruleset.js +8 -5
- package/dist/rulesets/wherewithal/ruleset.js +2 -1
- package/dist/seed/presets.js +15 -9
- package/dist/seed/prompts.js +24 -5
- package/dist/seed/scripts.js +3 -0
- package/dist/shared/annexField.js +23 -3
- package/dist/shared/illustrateScene.d.ts +1 -0
- package/dist/shared/illustrateScene.js +29 -1
- package/dist/shared/lore.d.ts +13 -0
- package/dist/shared/lore.js +37 -1
- package/dist/shared/portrait.js +13 -4
- package/dist/shared/reckoning.d.ts +8 -2
- package/dist/shared/reckoning.js +47 -30
- package/dist/shared/roundTick.d.ts +20 -0
- package/dist/shared/roundTick.js +76 -0
- package/dist/shared/sceneBoundaries.d.ts +7 -0
- package/dist/shared/sceneBoundaries.js +62 -0
- package/dist/shared/sceneSummaries.d.ts +7 -0
- package/dist/shared/sceneSummaries.js +49 -0
- package/dist/shared/speakMessage.d.ts +9 -2
- package/dist/shared/speakMessage.js +32 -9
- package/dist/shared/speechFields.js +4 -0
- package/dist/shared/summarize/character.d.ts +1 -1
- package/dist/shared/summarize/history.d.ts +1 -1
- package/dist/shared/summarize/scene.d.ts +1 -1
- package/dist/shared/summarize/summarizeScene.js +1 -0
- package/dist/shared/summarize/summarizeSpec.d.ts +1 -1
- package/dist/shared/summarize/world.d.ts +1 -1
- package/dist/shared/ui/attendance/index.d.ts +3 -2
- package/dist/shared/ui/attendance/index.js +3 -7
- package/dist/shared/ui/chronicle/index.d.ts +24 -2
- package/dist/shared/ui/chronicle/index.js +58 -29
- package/dist/shared/ui/conversation/formAnswer.d.ts +16 -2
- package/dist/shared/ui/conversation/formAnswer.js +23 -9
- package/dist/shared/ui/conversation/index.d.ts +2 -0
- package/dist/shared/ui/conversation/index.js +4 -0
- package/dist/shared/ui/conversation/itemValues.d.ts +16 -3
- package/dist/shared/ui/conversation/itemValues.js +15 -5
- package/dist/shared/ui/conversation/messageVerbState.d.ts +17 -2
- package/dist/shared/ui/conversation/messageVerbState.js +5 -4
- package/dist/shared/ui/conversation/readingPlace.d.ts +40 -0
- package/dist/shared/ui/conversation/readingPlace.js +119 -0
- package/dist/shared/ui/conversation/rewindStrip.d.ts +13 -4
- package/dist/shared/ui/conversation/rewindStrip.js +29 -7
- package/dist/shared/ui/conversation/runsInProgress.d.ts +30 -0
- package/dist/shared/ui/conversation/runsInProgress.js +47 -0
- package/dist/shared/ui/conversation/storyDays.d.ts +7 -1
- package/dist/shared/ui/conversation/storyDays.js +8 -0
- package/dist/shared/ui/conversation/tableChannel.d.ts +8 -11
- package/dist/shared/ui/conversation/tableChannel.js +8 -9
- package/dist/shared/ui/places/index.d.ts +3 -2
- package/dist/shared/ui/places/index.js +4 -5
- package/dist/shared/ui/routine-log/index.d.ts +3 -0
- package/dist/shared/ui/routine-log/index.js +22 -0
- package/dist/shared/ui/scene-portraits/portraits.d.ts +50 -16
- package/dist/shared/ui/scene-portraits/portraits.js +84 -21
- package/dist/shared/ui/session-runs/index.d.ts +90 -0
- package/dist/shared/ui/session-runs/index.js +143 -0
- package/dist/shared/ui/session-state/stateView.d.ts +18 -5
- package/dist/shared/ui/session-state/stateView.js +29 -8
- package/dist/shared/ui/turn-order/index.d.ts +0 -9
- package/dist/shared/ui/turn-order/index.js +1 -2
- package/package.json +12 -8
- /package/dist/components/{shared-4ME6NFDK.js → shared-LUIF6DW7.js} +0 -0
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
LORE_ENTRIES_FILTERS,
|
|
34
34
|
LORE_ENTRIES_SORTS,
|
|
35
35
|
createLatestAsk,
|
|
36
|
-
loreEntriesEmptyLine,
|
|
37
36
|
loreEntriesSpan,
|
|
37
|
+
loreEntriesEmptyLine,
|
|
38
38
|
loreEntryName,
|
|
39
39
|
loreEntryReadLine,
|
|
40
40
|
readLoreEntriesSettings,
|
|
@@ -192,9 +192,7 @@
|
|
|
192
192
|
<p data-widget-part="lore-entries.note">
|
|
193
193
|
{t("These entries are the lorebook owner's to manage.")}
|
|
194
194
|
</p>
|
|
195
|
-
{:else if answer && answer.lorebookId === null}
|
|
196
|
-
<p data-widget-part="lore-entries.note">{t("This session reads no lorebook.")}</p>
|
|
197
|
-
{:else}
|
|
195
|
+
{:else if !(answer && answer.lorebookId === null)}
|
|
198
196
|
<div data-widget-part="lore-entries.search-bar toolbar">
|
|
199
197
|
<label data-widget-part="lore-entries.search">
|
|
200
198
|
<span data-widget-part="lore-entries.search-label">{t("Search entries by title or key")}</span>
|
|
@@ -224,42 +222,46 @@
|
|
|
224
222
|
<sp-icon name="refresh-cw" size="14"></sp-icon>
|
|
225
223
|
</button>
|
|
226
224
|
</div>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
<!-- The combobox's own label is the one visible "Sort" (the host draws it). -->
|
|
246
|
-
<sp-combobox
|
|
247
|
-
data-widget-part="lore-entries.sort-field"
|
|
248
|
-
label={t("Sort")}
|
|
249
|
-
value={effectiveSort}
|
|
250
|
-
onchange={(e: CustomEvent<{ value: string }>) => {
|
|
251
|
-
const next = LORE_ENTRIES_SORTS.find((s) => s.value === e.detail.value)
|
|
252
|
-
if (!next) return
|
|
253
|
-
sort = next.value
|
|
254
|
-
offset = 0
|
|
255
|
-
}}
|
|
256
|
-
>
|
|
257
|
-
{#each LORE_ENTRIES_SORTS as o (o.value)}
|
|
258
|
-
<sp-option value={o.value}>{t(o.label)}</sp-option>
|
|
225
|
+
<!-- A widget with nothing to show draws nothing (STYLE-GUIDE §6.7): no filters or Sort over a book
|
|
226
|
+
answered as empty. Before the first answer they are drawn, so they do not arrive after the list. -->
|
|
227
|
+
{#if !answer || answer.total > 0 || searched || filter !== "all"}
|
|
228
|
+
<div data-widget-part="lore-entries.filter-bar toolbar">
|
|
229
|
+
<div data-widget-part="lore-entries.filters" role="radiogroup" aria-label={t("Show")}>
|
|
230
|
+
{#each LORE_ENTRIES_FILTERS as f (f.value)}
|
|
231
|
+
<!-- Chosen is the radio's own `:checked`: the sheet reads it, no state attribute. -->
|
|
232
|
+
<label data-widget-part="lore-entries.filter chip">
|
|
233
|
+
<input
|
|
234
|
+
type="radio"
|
|
235
|
+
data-widget-part="lore-entries.filter-input"
|
|
236
|
+
name={filterGroup}
|
|
237
|
+
value={f.value}
|
|
238
|
+
checked={filter === f.value}
|
|
239
|
+
onchange={() => setFilter(f.value)}
|
|
240
|
+
/>
|
|
241
|
+
{t(f.label)}
|
|
242
|
+
</label>
|
|
259
243
|
{/each}
|
|
260
|
-
</
|
|
261
|
-
|
|
262
|
-
|
|
244
|
+
</div>
|
|
245
|
+
<span data-widget-part="lore-entries.sort">
|
|
246
|
+
<!-- The combobox's own label is the one visible "Sort" (the host draws it). -->
|
|
247
|
+
<sp-combobox
|
|
248
|
+
data-widget-part="lore-entries.sort-field"
|
|
249
|
+
label={t("Sort")}
|
|
250
|
+
value={effectiveSort}
|
|
251
|
+
onchange={(e: CustomEvent<{ value: string }>) => {
|
|
252
|
+
const next = LORE_ENTRIES_SORTS.find((s) => s.value === e.detail.value)
|
|
253
|
+
if (!next) return
|
|
254
|
+
sort = next.value
|
|
255
|
+
offset = 0
|
|
256
|
+
}}
|
|
257
|
+
>
|
|
258
|
+
{#each LORE_ENTRIES_SORTS as o (o.value)}
|
|
259
|
+
<sp-option value={o.value}>{t(o.label)}</sp-option>
|
|
260
|
+
{/each}
|
|
261
|
+
</sp-combobox>
|
|
262
|
+
</span>
|
|
263
|
+
</div>
|
|
264
|
+
{/if}
|
|
263
265
|
|
|
264
266
|
{#if readError}
|
|
265
267
|
<p data-widget-part="lore-entries.alert" role="alert">{readError}</p>
|
|
@@ -308,8 +310,9 @@
|
|
|
308
310
|
</span>
|
|
309
311
|
</li>
|
|
310
312
|
{:else}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
+
<!-- Only after a search or filter the reader set: at rest an empty book draws nothing. -->
|
|
314
|
+
{#if answer && (searched || filter !== "all")}
|
|
315
|
+
<li data-widget-part="lore-entries.empty empty">{loreEntriesEmptyLine(searched, filter, t)}</li>
|
|
313
316
|
{/if}
|
|
314
317
|
{/each}
|
|
315
318
|
</ul>
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
{:else if d.type === "enum"}
|
|
435
435
|
<sp-combobox
|
|
436
436
|
data-widget-part="messages.block-select"
|
|
437
|
-
label={key}
|
|
437
|
+
label={fieldLabel(key, d)}
|
|
438
438
|
value={String(formDrafts[i]?.[key] ?? d.default ?? "")}
|
|
439
439
|
onchange={(e: CustomEvent<{ value: string }>) =>
|
|
440
440
|
editField(i, key, e.detail.value)}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { actionIdentity } from "@serene-pub/sdk/component"
|
|
9
9
|
import { useConversation } from "./conversation.svelte"
|
|
10
10
|
import type { MessageV1, WidgetAction } from "@serene-pub/sdk/component"
|
|
11
|
-
import { playbackOf } from "./spokenLine"
|
|
11
|
+
import { fileCountLabel, fileCountSr, playbackOf } from "./spokenLine"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* A message's ⋮ menu: every verb the session offers on it, named in words.
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
*/
|
|
27
27
|
speech?: {
|
|
28
28
|
src: string | null
|
|
29
|
+
/** The line's files as the `audio` `playlist` (2+ files); `src` is then not drawn. */
|
|
30
|
+
playlist?: string | null
|
|
29
31
|
hasAudio: boolean
|
|
30
32
|
/** A take is on file (even under playback `never`): Read aloud reads Say it again. */
|
|
31
33
|
sayItAgain?: boolean
|
|
@@ -132,8 +134,10 @@
|
|
|
132
134
|
canControl,
|
|
133
135
|
canRerun,
|
|
134
136
|
canDelete,
|
|
137
|
+
waitFor: conv.dossier?.rerunWaitsFor,
|
|
135
138
|
extendRefusal,
|
|
136
|
-
speechReason: conv.dossier?.speech?.canSpeak === false ? conv.dossier.speech.reason : undefined
|
|
139
|
+
speechReason: conv.dossier?.speech?.canSpeak === false ? conv.dossier.speech.reason : undefined,
|
|
140
|
+
refOfMember: conv.refOfMember
|
|
137
141
|
})
|
|
138
142
|
// `itemGated` rides with `canAct` (W6): a contributed action whose
|
|
139
143
|
// audience is `item` was answered `true` ahead of any message, and this
|
|
@@ -163,7 +167,16 @@
|
|
|
163
167
|
)
|
|
164
168
|
/** ⋮ › Speech holds the full player alone: drawn only where there is one. */
|
|
165
169
|
const speechPlayer = $derived(!!speech?.hasAudio && !!speech.src && speech.playback !== "never")
|
|
166
|
-
|
|
170
|
+
/** The file the ⋮ player is on (0-based), off its playhead. */
|
|
171
|
+
let menuFile = $state(0)
|
|
172
|
+
const menuFiles = $derived(speech?.playlist ? speech.playlist.split(" ").length : 1)
|
|
173
|
+
const reportAt = (e: Event) => {
|
|
174
|
+
const at = playbackOf((e as CustomEvent).detail)
|
|
175
|
+
if (at) menuFile = at.playlistIndex ?? 0
|
|
176
|
+
conv.speech.reportMenuAt(msg.id, at)
|
|
177
|
+
}
|
|
178
|
+
const menuCount = $derived(fileCountLabel(menuFile, menuFiles))
|
|
179
|
+
const menuCountSr = $derived(fileCountSr(menuFile, menuFiles))
|
|
167
180
|
const speechTake = $derived(conv.speech.take(msg.id, "menu"))
|
|
168
181
|
const menuPlayAttr = $derived(conv.speech.isPlaying(msg.id, "menu") ? { playing: "" } : {})
|
|
169
182
|
const speakName = (a: WidgetAction) =>
|
|
@@ -218,6 +231,9 @@
|
|
|
218
231
|
* wrote this reply and opens the inspector (`inspect-run`), or says there
|
|
219
232
|
* is none.
|
|
220
233
|
*/
|
|
234
|
+
// Inspect run is offered on a reply, and `SessionMessage.svelte` draws an
|
|
235
|
+
// administrator's failure detail under a line only where it is not: the two
|
|
236
|
+
// conditions stay each other's opposite, or the detail shows in neither place.
|
|
221
237
|
const isReply = $derived(!!msg.characterId || !!msg.isNarratorResponse)
|
|
222
238
|
|
|
223
239
|
/**
|
|
@@ -312,7 +328,7 @@
|
|
|
312
328
|
</span>
|
|
313
329
|
{/if}
|
|
314
330
|
{/each}
|
|
315
|
-
{#if conv.dossier?.writes.lore && !msg.isGenerating}
|
|
331
|
+
{#if conv.dossier?.isOwner && conv.dossier.writes.lore && !msg.isGenerating && conv.select.offered}
|
|
316
332
|
<button
|
|
317
333
|
data-widget-part="messages.message-option"
|
|
318
334
|
title="Select for summary"
|
|
@@ -469,7 +485,8 @@
|
|
|
469
485
|
aria-label="Spoken line player"
|
|
470
486
|
controls
|
|
471
487
|
preload="none"
|
|
472
|
-
src={speech.src}
|
|
488
|
+
src={speech.playlist ? null : speech.src}
|
|
489
|
+
{...(speech.playlist ? { playlist: speech.playlist } : {})}
|
|
473
490
|
{...menuPlayAttr}
|
|
474
491
|
onplay={(e) => {
|
|
475
492
|
reportAt(e)
|
|
@@ -487,6 +504,7 @@
|
|
|
487
504
|
onloadedmetadata={reportAt}
|
|
488
505
|
></audio>
|
|
489
506
|
{/key}
|
|
507
|
+
{#if menuCount}<span data-widget-part="messages.message-speech-count"><span aria-hidden="true">{menuCount}</span><span data-widget-part="messages.spoken-sr">{menuCountSr}</span></span>{/if}
|
|
490
508
|
</div>
|
|
491
509
|
</sp-popover>
|
|
492
510
|
{/if}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import type { ComponentContext } from "@serene-pub/sdk/component"
|
|
9
9
|
import { WIDGET_CONTEXT_KEY } from "@serene-pub/core-catalog/conversation"
|
|
10
10
|
import MessagesWidget from "./MessagesWidget.svelte"
|
|
11
|
+
import WidgetBoundary from "../WidgetBoundary.svelte"
|
|
11
12
|
import { widgetRefFromComponent } from "../widgetRef.svelte"
|
|
12
13
|
|
|
13
14
|
let { ctx }: { ctx: ComponentContext } = $props()
|
|
@@ -22,4 +23,4 @@
|
|
|
22
23
|
)
|
|
23
24
|
</script>
|
|
24
25
|
|
|
25
|
-
<MessagesWidget
|
|
26
|
+
<WidgetBoundary {ctx}><MessagesWidget /></WidgetBoundary>
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { MessageOrder } from "@serene-pub/core-catalog/conversation"
|
|
3
3
|
|
|
4
|
-
/** How the composer's field is drawn. */
|
|
5
|
-
export type ComposerSkin = "classic" | "minimal" | "writer" | "quill"
|
|
6
|
-
|
|
7
|
-
/** Which end of the widget the composer sits at. */
|
|
8
|
-
export type ComposerPosition = "bottom" | "top"
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Who is due next (PLAN-turn-order §4.9): the order's head with Continue,
|
|
12
|
-
* the head and who follows it, or nothing.
|
|
13
|
-
*/
|
|
14
|
-
export type NextUp = "head" | "list" | "hidden"
|
|
15
|
-
|
|
16
4
|
/**
|
|
17
|
-
* How wide the log's rows and the
|
|
5
|
+
* How wide the log's rows run (and, through the host, the Composer beside
|
|
6
|
+
* it): a reading column of about
|
|
18
7
|
* 76 characters of the story's body text centred in the box (`column`,
|
|
19
8
|
* the default since ★R1, 2026-10-24), the whole width the layout gives
|
|
20
9
|
* the widget (`full`), or the narrower measure (`comfortable`, about
|
|
@@ -36,17 +25,11 @@
|
|
|
36
25
|
* with the declared default wherever the instance has no deviation. The
|
|
37
26
|
* page receives this object too (as the snippet parameter and through
|
|
38
27
|
* `onSettings`), so the log, the composer and the page's scroll handling
|
|
39
|
-
* all answer to one reading of the settings.
|
|
28
|
+
* all answer to one reading of the settings. The composer's and the turn
|
|
29
|
+
* line's settings are theirs now (owner R8 2026-11-05).
|
|
40
30
|
*/
|
|
41
31
|
export interface ConversationSettings {
|
|
42
32
|
order: MessageOrder
|
|
43
|
-
composerSkin: ComposerSkin
|
|
44
|
-
/**
|
|
45
|
-
* 🚧 The composer while a tab other than the first is shown
|
|
46
|
-
* (`otherTabsComposer`, lair fix 2), or `same` — `composerSkin`.
|
|
47
|
-
*/
|
|
48
|
-
otherTabsComposer: ComposerSkin | "same"
|
|
49
|
-
composerPosition: ComposerPosition
|
|
50
33
|
lineWidth: LineWidth
|
|
51
34
|
/**
|
|
52
35
|
* The effective presentation: a stored `rows` or `folio`, else —
|
|
@@ -54,13 +37,9 @@
|
|
|
54
37
|
* channel is a folio-role one, else `rows`.
|
|
55
38
|
*/
|
|
56
39
|
presentation: Presentation
|
|
57
|
-
showMessages: boolean
|
|
58
|
-
showComposer: boolean
|
|
59
40
|
showAvatars: boolean
|
|
60
41
|
showTimestamps: boolean
|
|
61
42
|
showSceneMarkers: boolean
|
|
62
|
-
nextUp: NextUp
|
|
63
|
-
showActions: boolean
|
|
64
43
|
/**
|
|
65
44
|
* The one channel this copy shows (lair re-plan S1), or `null` for the
|
|
66
45
|
* primary log. The host narrows the rows and the composer's channels
|
|
@@ -86,18 +65,11 @@
|
|
|
86
65
|
*/
|
|
87
66
|
export const CONVERSATION_DEFAULTS: ConversationSettings = {
|
|
88
67
|
order: "oldest-first",
|
|
89
|
-
|
|
90
|
-
otherTabsComposer: "same",
|
|
91
|
-
composerPosition: "bottom",
|
|
92
|
-
lineWidth: "column",
|
|
68
|
+
lineWidth: "full",
|
|
93
69
|
presentation: "rows",
|
|
94
|
-
showMessages: true,
|
|
95
|
-
showComposer: true,
|
|
96
70
|
showAvatars: true,
|
|
97
71
|
showTimestamps: true,
|
|
98
72
|
showSceneMarkers: true,
|
|
99
|
-
nextUp: "head",
|
|
100
|
-
showActions: true,
|
|
101
73
|
channel: null,
|
|
102
74
|
emptyState: null,
|
|
103
75
|
timeFormat: null
|
|
@@ -122,14 +94,11 @@
|
|
|
122
94
|
* Read one settings payload into the complete object above.
|
|
123
95
|
*
|
|
124
96
|
* `channelRole` is what the copy's claimed channel IS (`ChannelDecl.role`,
|
|
125
|
-
* off the dossier), and it decides the
|
|
126
|
-
* settings leave
|
|
97
|
+
* off the dossier), and it decides the value Folio changes when the
|
|
98
|
+
* settings leave it to it: a `presentation` of `auto` (the declared
|
|
127
99
|
* default, _Follow the channel_), or none, follows the channel (a folio
|
|
128
|
-
* channel reads as Folio)
|
|
129
|
-
*
|
|
130
|
-
* default. Settings arrive complete, so `classic` — the default — is the
|
|
131
|
-
* one value that cannot say "chosen"; a Folio copy that wants the card
|
|
132
|
-
* back cannot have it, which is the price of a manuscript's page line.
|
|
100
|
+
* channel reads as Folio). The Composer's skin follows the same rule on
|
|
101
|
+
* its side (`readComposerSettings`).
|
|
133
102
|
*/
|
|
134
103
|
export function readConversationSettings(
|
|
135
104
|
raw: Record<string, unknown> | undefined,
|
|
@@ -144,40 +113,15 @@
|
|
|
144
113
|
channelRole === "folio" ? "folio" : d.presentation
|
|
145
114
|
)
|
|
146
115
|
const folio = presentation === "folio"
|
|
147
|
-
const skin = pickEnum(
|
|
148
|
-
v.composer,
|
|
149
|
-
["classic", "minimal", "writer", "quill"],
|
|
150
|
-
d.composerSkin
|
|
151
|
-
)
|
|
152
116
|
return {
|
|
153
117
|
order: pickEnum(v.order, ["oldest-first", "newest-first"], d.order),
|
|
154
|
-
composerSkin: folio && skin === d.composerSkin ? "quill" : skin,
|
|
155
|
-
otherTabsComposer: pickEnum(
|
|
156
|
-
v.otherTabsComposer,
|
|
157
|
-
["same", "classic", "minimal", "writer", "quill"],
|
|
158
|
-
d.otherTabsComposer
|
|
159
|
-
),
|
|
160
|
-
composerPosition: pickEnum(
|
|
161
|
-
v.composerPosition,
|
|
162
|
-
["bottom", "top"],
|
|
163
|
-
d.composerPosition
|
|
164
|
-
),
|
|
165
118
|
lineWidth: pickEnum(v.lineWidth, ["column", "full", "comfortable"], d.lineWidth),
|
|
166
119
|
presentation,
|
|
167
|
-
showMessages: pickBool(v.showMessages, d.showMessages),
|
|
168
|
-
showComposer: pickBool(v.showComposer, d.showComposer),
|
|
169
120
|
showAvatars: pickBool(v.showAvatars, d.showAvatars),
|
|
170
121
|
showTimestamps: pickBool(v.showTimestamps, d.showTimestamps),
|
|
171
122
|
// A manuscript has no scenes or dates between its paragraphs.
|
|
172
123
|
showSceneMarkers:
|
|
173
124
|
!folio && pickBool(v.showSceneMarkers, d.showSceneMarkers),
|
|
174
|
-
// ⏳ `showNudge: false` was this setting before `nextUp` (A8).
|
|
175
|
-
nextUp: pickEnum(
|
|
176
|
-
v.nextUp,
|
|
177
|
-
["head", "list", "hidden"],
|
|
178
|
-
v.showNudge === false ? "hidden" : d.nextUp
|
|
179
|
-
),
|
|
180
|
-
showActions: pickBool(v.showActions, d.showActions),
|
|
181
125
|
channel:
|
|
182
126
|
typeof v.channel === "string" && v.channel.trim()
|
|
183
127
|
? v.channel.trim()
|
|
@@ -196,24 +140,23 @@
|
|
|
196
140
|
|
|
197
141
|
<script lang="ts">
|
|
198
142
|
/**
|
|
199
|
-
* The `messages` widget's component: the log you read
|
|
200
|
-
*
|
|
143
|
+
* The `messages` widget's component: the log you read, with its channel
|
|
144
|
+
* head and tabs and the selection bar at its foot. The Composer and the
|
|
145
|
+
* Turn line are widgets beside it (owner R8 2026-11-05, PLAN-session-
|
|
146
|
+
* layout-simplify D7/D8); it tells the host which channel it shows
|
|
147
|
+
* (`show-channel`) so they follow it.
|
|
201
148
|
*
|
|
202
149
|
* It owns the conversation (C0b): the model its parts read
|
|
203
|
-
* (`conversation.svelte.ts`)
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* onto the root as data attributes, and decides which end the composer
|
|
208
|
-
* sits at.
|
|
150
|
+
* (`conversation.svelte.ts`) and the log; the page's own views are the
|
|
151
|
+
* Composer's and the Turn line's to place. It reads the widget's settings off
|
|
152
|
+
* `useWidgetContext()`, hands them to the page (`onSettings`) and writes
|
|
153
|
+
* them onto the root as data attributes.
|
|
209
154
|
*/
|
|
210
155
|
import { untrack } from "svelte"
|
|
211
156
|
import { SvelteMap } from "svelte/reactivity"
|
|
212
|
-
import { channelTabDots, channelTabsOf, newestNewsOn
|
|
157
|
+
import { channelTabDots, channelTabsOf, newestNewsOn } from "@serene-pub/core-catalog/conversation"
|
|
213
158
|
import { useWidgetContext } from "../context"
|
|
214
159
|
import SessionContainer from "./SessionContainer.svelte"
|
|
215
|
-
import SessionComposer from "./SessionComposer.svelte"
|
|
216
|
-
import TurnLine from "./TurnLine.svelte"
|
|
217
160
|
import { createConversation, setConversation } from "./conversation.svelte"
|
|
218
161
|
import { markedRun, runOffer } from "./sceneMarks"
|
|
219
162
|
|
|
@@ -259,13 +202,13 @@
|
|
|
259
202
|
const selectionRefusal = $derived(
|
|
260
203
|
conversation?.scenes.refusal?.at === "selection" ? conversation.scenes.refusal.text : null
|
|
261
204
|
)
|
|
262
|
-
/** Every line a scene has not already captured. */
|
|
263
|
-
const selectable =
|
|
205
|
+
/** Every line a scene has not already captured, worked out when *Select all* is pressed. */
|
|
206
|
+
const selectable = () => {
|
|
264
207
|
const taken = new Set(conversation?.dossier?.scened ?? [])
|
|
265
208
|
return ((conversation?.rows ?? []) as Array<{ id: number }>)
|
|
266
209
|
.map((m) => m.id)
|
|
267
210
|
.filter((id) => !taken.has(id))
|
|
268
|
-
}
|
|
211
|
+
}
|
|
269
212
|
let settings = $derived.by(() => {
|
|
270
213
|
const raw = ctx?.current.settings.v1 as Record<string, unknown> | undefined
|
|
271
214
|
// The claimed channel's role, when the host says it (the dossier's
|
|
@@ -282,10 +225,11 @@
|
|
|
282
225
|
* more channels — the Lair's story with its Sanctum, for the GM — draws a
|
|
283
226
|
* tab each above the log (`channelTabsOf`), in place of the composer's
|
|
284
227
|
* old channel switch. The active tab is the conversation's lane: the log
|
|
285
|
-
* shows its rows and the
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
228
|
+
* shows its rows, and the host is told it (`show-channel`) so the Composer
|
|
229
|
+
* writes there. A guest is never told the Sanctum (an owner-only
|
|
230
|
+
* channel), so their story has no tabs. The tabs are the host's
|
|
231
|
+
* (`sp-tabs`): the page draws the tablist, its roving focus and its arrow
|
|
232
|
+
* keys (STYLE-GUIDE §10), and raises `change`.
|
|
289
233
|
*/
|
|
290
234
|
// Never on a copy pinned to a channel: its claim is one channel, its head names it.
|
|
291
235
|
const tabs = $derived(conversation && !settings.channel ? channelTabsOf(conversation.channels) : [])
|
|
@@ -300,8 +244,22 @@
|
|
|
300
244
|
* its history read. Written by the effect below, never read tracked there.
|
|
301
245
|
*/
|
|
302
246
|
const seen = new SvelteMap<string, number>()
|
|
247
|
+
/**
|
|
248
|
+
* What the tabs' news reads off a row (`newestNewsOn`): id, channel,
|
|
249
|
+
* userId, role, isHidden, isGenerating — and nothing else. A streamed
|
|
250
|
+
* token that changes none of them reruns neither the effect nor `dots`.
|
|
251
|
+
* Empty without tabs, which read no rows.
|
|
252
|
+
*/
|
|
253
|
+
const newsKey = $derived(
|
|
254
|
+
tabs.length
|
|
255
|
+
? ((conversation?.rows ?? []) as Array<Record<string, unknown>>)
|
|
256
|
+
.map((m) => `${m.id}|${m.channel ?? ""}|${typeof m.userId}:${String(m.userId)}|${m.role ?? "user"}|${m.isHidden ? 1 : 0}|${m.isGenerating ? 1 : 0}`)
|
|
257
|
+
.join(",")
|
|
258
|
+
: ""
|
|
259
|
+
)
|
|
303
260
|
$effect(() => {
|
|
304
|
-
|
|
261
|
+
void newsKey
|
|
262
|
+
const rows = untrack(() => (conversation?.rows ?? []) as Parameters<typeof newestNewsOn>[0])
|
|
305
263
|
for (const tab of tabs) {
|
|
306
264
|
const newest = newestNewsOn(rows, tab, viewerId)
|
|
307
265
|
const active = tab === activeTab
|
|
@@ -311,44 +269,33 @@
|
|
|
311
269
|
}
|
|
312
270
|
})
|
|
313
271
|
/** The tabs with a line nobody has shown the viewer yet. */
|
|
314
|
-
const dots = $derived(
|
|
315
|
-
|
|
316
|
-
|
|
272
|
+
const dots = $derived.by(() => {
|
|
273
|
+
void newsKey
|
|
274
|
+
const rows = untrack(() => (conversation?.rows ?? []) as Parameters<typeof newestNewsOn>[0])
|
|
275
|
+
return channelTabDots(tabs, activeTab, rows, viewerId, seen)
|
|
276
|
+
})
|
|
317
277
|
/** A tab's name, said with its news to a screen reader (the trigger's own label). */
|
|
318
278
|
const tabLabel = (slug: string) =>
|
|
319
279
|
`${conversation?.channelName(slug) ?? slug}${dots.has(slug) ? " (new lines)" : ""}`
|
|
320
280
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
281
|
+
* Tell the host which channel this copy shows (`show-channel`): once the
|
|
282
|
+
* conversation has a lane, and again whenever the lane changes — a tab
|
|
283
|
+
* pressed, or the channels list moving which lane is current. The Composer
|
|
284
|
+
* and the Turn line write beside the copy they follow. The canonical lane
|
|
285
|
+
* string as `lane.current` returns it; the same value is never sent twice
|
|
286
|
+
* in a row.
|
|
324
287
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
* primary log, or one pinned to `main`), with Forward beside it for the
|
|
335
|
-
* owner. The host says how many turns are ahead and why a press would be
|
|
336
|
-
* refused (`dossier.rewind`); nothing presses while a reply is being
|
|
337
|
-
* written. The two presses themselves are the session header's (polish
|
|
338
|
-
* parity L1, 2026-10-24: chrome above the first message is at most two
|
|
339
|
-
* rows), which reads the same state through `rewindStripState`.
|
|
340
|
-
*/
|
|
341
|
-
const generating = $derived(
|
|
342
|
-
((conversation?.ctx.messages.v1 ?? []) as Array<{ isGenerating?: boolean }>).some((m) => m.isGenerating)
|
|
343
|
-
)
|
|
344
|
-
const rewind = $derived(
|
|
345
|
-
rewindStripState({
|
|
346
|
-
rewind: conversation?.rewind.state,
|
|
347
|
-
isOwner: !!conversation?.dossier?.isOwner,
|
|
348
|
-
generating,
|
|
349
|
-
story: !settings.channel || settings.channel === "main" || settings.channel.startsWith("main:")
|
|
288
|
+
let announced: string | null = null
|
|
289
|
+
$effect(() => {
|
|
290
|
+
// A lane exists once the host has said the channels, and the viewer is in one.
|
|
291
|
+
if (!conversation?.dossier || conversation.noLane) return
|
|
292
|
+
const channel = conversation.lane.current
|
|
293
|
+
untrack(() => {
|
|
294
|
+
if (channel === announced) return
|
|
295
|
+
announced = channel
|
|
296
|
+
conversation.request("show-channel", { channel })
|
|
350
297
|
})
|
|
351
|
-
)
|
|
298
|
+
})
|
|
352
299
|
// Compared by value, the way `WidgetHost` compares its layout: the widget
|
|
353
300
|
// context re-projects on every message that lands, and the settings on it
|
|
354
301
|
// are the same object nearly every time.
|
|
@@ -368,11 +315,8 @@
|
|
|
368
315
|
<div
|
|
369
316
|
data-widget-part="messages.root"
|
|
370
317
|
data-order={settings.order}
|
|
371
|
-
data-composer-position={settings.composerPosition}
|
|
372
|
-
data-composer-skin={composerSkin}
|
|
373
318
|
data-line-width={settings.lineWidth}
|
|
374
319
|
data-presentation={settings.presentation}
|
|
375
|
-
data-show-messages={settings.showMessages}
|
|
376
320
|
data-show-avatars={settings.showAvatars}
|
|
377
321
|
data-show-timestamps={settings.showTimestamps}
|
|
378
322
|
data-show-scene-markers={settings.showSceneMarkers}
|
|
@@ -418,30 +362,25 @@
|
|
|
418
362
|
{/if}
|
|
419
363
|
<!-- The whole panel scrolls: the log spans the widget's width, so its
|
|
420
364
|
scrollbar sits at the panel's edge and the wheel works anywhere in it;
|
|
421
|
-
the rows (the stage, `messages.stage`)
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
/>
|
|
436
|
-
{/if}
|
|
437
|
-
</div>
|
|
438
|
-
{/if}
|
|
365
|
+
the rows (the stage, `messages.stage`) take a centred reading measure
|
|
366
|
+
when the Line width setting says Column or Comfortable, or the
|
|
367
|
+
widget's full width at Full (the default). The Composer and the Turn
|
|
368
|
+
line are widgets of their own beside this one (owner R8 2026-11-05). -->
|
|
369
|
+
<div data-widget-part="messages.log">
|
|
370
|
+
{#if conversation}
|
|
371
|
+
<SessionContainer
|
|
372
|
+
order={settings.order}
|
|
373
|
+
showSceneMarkers={settings.showSceneMarkers}
|
|
374
|
+
presentation={settings.presentation}
|
|
375
|
+
emptyState={settings.emptyState}
|
|
376
|
+
/>
|
|
377
|
+
{/if}
|
|
378
|
+
</div>
|
|
439
379
|
{#if selecting && conversation}
|
|
440
|
-
<!-- Selecting lines for a summary: the
|
|
441
|
-
|
|
442
|
-
<!--
|
|
443
|
-
|
|
444
|
-
stands in the composer's place. -->
|
|
380
|
+
<!-- Selecting lines for a summary: the selection's own bar, at the
|
|
381
|
+
widget's foot, and committing hands it to the host. -->
|
|
382
|
+
<!-- Its wrapper parts stay `messages.compose` (on the reading column)
|
|
383
|
+
and `messages.compose-area`, so the stylesheet still draws it. -->
|
|
445
384
|
<div data-widget-part="messages.compose">
|
|
446
385
|
<div data-widget-part="messages.compose-area">
|
|
447
386
|
<!-- The selection bar's parts are `messages.selection-*` (STYLE-GUIDE
|
|
@@ -468,7 +407,7 @@
|
|
|
468
407
|
<button
|
|
469
408
|
data-widget-part="messages.select-all messages.selection-button"
|
|
470
409
|
title="Select all"
|
|
471
|
-
onclick={() => conversation.select.set(selectable)}
|
|
410
|
+
onclick={() => conversation.select.set(selectable())}
|
|
472
411
|
>
|
|
473
412
|
<sp-icon name="check-square" size="16"></sp-icon>
|
|
474
413
|
<span data-widget-part="messages.selection-button-label">Select all</span>
|
|
@@ -544,53 +483,5 @@
|
|
|
544
483
|
</div>
|
|
545
484
|
</div>
|
|
546
485
|
</div>
|
|
547
|
-
{:else if settings.showComposer && conversation && !conversation.noLane}
|
|
548
|
-
{@const dossier = conversation.dossier}
|
|
549
|
-
<div data-widget-part="messages.compose">
|
|
550
|
-
<!-- The turn line (§3.16): what the last run did, and who is next —
|
|
551
|
-
one row above the field. -->
|
|
552
|
-
<TurnLine nextUp={settings.nextUp} />
|
|
553
|
-
<div data-widget-part="messages.compose-area">
|
|
554
|
-
{#if dossier?.readOnly}
|
|
555
|
-
<!-- Read-only (19 §6, ruled): the mode disappeared, the history
|
|
556
|
-
stays, nothing starts a new turn — and the server refuses
|
|
557
|
-
independently at every generation choke, so this banner is
|
|
558
|
-
honesty, not the lock. -->
|
|
559
|
-
<div data-widget-part="messages.read-only" role="status">
|
|
560
|
-
<sp-icon name="lock" size="20" data-widget-part="messages.read-only-icon"></sp-icon>
|
|
561
|
-
<div data-widget-part="messages.read-only-text">
|
|
562
|
-
<p data-widget-part="messages.read-only-title">This session is read-only.</p>
|
|
563
|
-
<p>
|
|
564
|
-
Its mode ({dossier.readOnly.genreId}) is not installed. Messages are safe to
|
|
565
|
-
read; new turns resume when the mode returns.
|
|
566
|
-
</p>
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
{:else}
|
|
570
|
-
{#if rewind.replaceText}
|
|
571
|
-
<!-- 🚧 While rewound (RF fix 5): a new line replaces the
|
|
572
|
-
turns ahead — said before it is written, with Forward
|
|
573
|
-
beside it for the owner. -->
|
|
574
|
-
<p data-widget-part="messages.rewind-replace" role="status">
|
|
575
|
-
<sp-icon name="undo-2" size="14" data-widget-part="messages.rewind-replace-icon"></sp-icon>
|
|
576
|
-
<span data-widget-part="messages.rewind-replace-text">{rewind.replaceText}</span>
|
|
577
|
-
{#if conversation.dossier?.isOwner}
|
|
578
|
-
<button
|
|
579
|
-
type="button"
|
|
580
|
-
data-widget-part="messages.rewind-replace-forward"
|
|
581
|
-
title={rewind.forward.reason ? `Forward — ${rewind.forward.reason}` : "Forward — bring the next turn back"}
|
|
582
|
-
aria-disabled={rewind.forward.disabled}
|
|
583
|
-
onclick={(e) => (rewind.forward.disabled ? e.preventDefault() : conversation.rewind.forward())}
|
|
584
|
-
>
|
|
585
|
-
<span>Forward</span>
|
|
586
|
-
<sp-icon name="redo-2" size="14"></sp-icon>
|
|
587
|
-
</button>
|
|
588
|
-
{/if}
|
|
589
|
-
</p>
|
|
590
|
-
{/if}
|
|
591
|
-
<SessionComposer {composerSkin} showActions={settings.showActions} />
|
|
592
|
-
{/if}
|
|
593
|
-
</div>
|
|
594
|
-
</div>
|
|
595
486
|
{/if}
|
|
596
487
|
</div>
|