@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
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
import { i18nText } from "@serene-pub/sdk/component"
|
|
40
40
|
import { untrack } from "svelte"
|
|
41
41
|
import { useConversation } from "./conversation.svelte"
|
|
42
|
+
import { composerSendShown } from "../composer/target"
|
|
42
43
|
import type { WidgetAction } from "@serene-pub/sdk/component"
|
|
43
44
|
|
|
44
45
|
/** The More panel's tab that is not a pane: the turn controls, in the actions row. */
|
|
@@ -49,9 +50,14 @@
|
|
|
49
50
|
composerSkin?: "classic" | "minimal" | "writer" | "quill"
|
|
50
51
|
/** Hides the Actions label and its row outright. */
|
|
51
52
|
showActions?: boolean
|
|
53
|
+
/**
|
|
54
|
+
* 🚧 Draws Send and Stop (the `showSend` setting). Off hides them where Enter sends;
|
|
55
|
+
* at the compact width they always show.
|
|
56
|
+
*/
|
|
57
|
+
showSend?: boolean
|
|
52
58
|
}
|
|
53
59
|
|
|
54
|
-
let { composerSkin = "classic", showActions = true }: Props = $props()
|
|
60
|
+
let { composerSkin = "classic", showActions = true, showSend = true }: Props = $props()
|
|
55
61
|
|
|
56
62
|
const conv = useConversation()
|
|
57
63
|
const c = $derived(conv.dossier?.composer)
|
|
@@ -292,10 +298,44 @@
|
|
|
292
298
|
})
|
|
293
299
|
let hintVisible = $state(false)
|
|
294
300
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Who the viewer may write as, from whichever source the host fills: the
|
|
303
|
+
* seats (`c.seats`, by participant reference), else the personas.
|
|
304
|
+
*/
|
|
305
|
+
type WriteAsEntry = {
|
|
306
|
+
key: string | number
|
|
307
|
+
name: string
|
|
308
|
+
avatarRef: string
|
|
309
|
+
active: boolean
|
|
310
|
+
choose: () => void
|
|
311
|
+
}
|
|
312
|
+
const entries = $derived.by((): WriteAsEntry[] => {
|
|
313
|
+
if (c?.seats) {
|
|
314
|
+
return c.seats.map((s) => ({
|
|
315
|
+
key: s.seatRef,
|
|
316
|
+
name: s.name,
|
|
317
|
+
avatarRef: s.seatRef,
|
|
318
|
+
active: s.seatRef === c?.seatRef,
|
|
319
|
+
choose: () => void conv.request("write-as", { seatRef: s.seatRef })
|
|
320
|
+
}))
|
|
321
|
+
}
|
|
322
|
+
return (c?.personas ?? []).map((p) => ({
|
|
323
|
+
key: p.personaId,
|
|
324
|
+
name: p.name,
|
|
325
|
+
avatarRef: personaRefOf(p.personaId),
|
|
326
|
+
active: p.personaId === c?.personaId,
|
|
327
|
+
choose: () => void conv.request("switch-persona", { personaId: p.personaId })
|
|
328
|
+
}))
|
|
329
|
+
})
|
|
330
|
+
const activeEntry = $derived(entries.find((e) => e.active) ?? null)
|
|
331
|
+
const entryCount = $derived(entries.length)
|
|
332
|
+
/**
|
|
333
|
+
* A persona's avatar reference: the `ref` its conversation cast row carries
|
|
334
|
+
* (🚧 the seat's); ⏳ `character:<personaId>` for a host that fills none.
|
|
335
|
+
*/
|
|
336
|
+
const personaRefOf = (personaId: number): string =>
|
|
337
|
+
conv.dossier?.cast?.sessionPersonas?.find((p) => p?.personaId === personaId && p.ref)?.ref ??
|
|
338
|
+
`character:${personaId}`
|
|
299
339
|
|
|
300
340
|
const tabs = $derived(c?.tabs ?? [])
|
|
301
341
|
let turnControls = $derived(tabs.find((t) => t.view === TURN_CONTROLS_VIEW))
|
|
@@ -395,7 +435,10 @@
|
|
|
395
435
|
if (argument === null) setField("")
|
|
396
436
|
paletteDismissed = null
|
|
397
437
|
paletteHighlight = -1
|
|
398
|
-
|
|
438
|
+
// A bare name still carries its argument slot, empty: the host fires
|
|
439
|
+
// an action whose text is optional without any, and opens the collect
|
|
440
|
+
// modal only for one that requires it (or asks who hears it).
|
|
441
|
+
conv.invoke(actionIdentity(action), undefined, undefined, argument ?? "")
|
|
399
442
|
}
|
|
400
443
|
/**
|
|
401
444
|
* The draft as a whole slash name and its argument (S2), when it has one:
|
|
@@ -520,8 +563,8 @@
|
|
|
520
563
|
let placeholder = $derived(
|
|
521
564
|
closed
|
|
522
565
|
? composerClosedPlaceholder(closed)
|
|
523
|
-
:
|
|
524
|
-
? `Write as ${
|
|
566
|
+
: activeEntry
|
|
567
|
+
? `Write as ${activeEntry.name}…`
|
|
525
568
|
: c?.playerLabel
|
|
526
569
|
? `Write as ${c.playerLabel}…`
|
|
527
570
|
: "Write a message…"
|
|
@@ -593,7 +636,7 @@
|
|
|
593
636
|
not an interaction of its own (natively; a remote hears no keys). -->
|
|
594
637
|
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
595
638
|
<div
|
|
596
|
-
data-widget-part="messages.composer"
|
|
639
|
+
data-widget-part="messages.composer composer.composer"
|
|
597
640
|
data-composer-skin={composerSkin}
|
|
598
641
|
data-closed={closed ? "" : undefined}
|
|
599
642
|
hidden={conv.edit.id !== null}
|
|
@@ -604,18 +647,18 @@
|
|
|
604
647
|
{#if takeSeatHere}
|
|
605
648
|
<!-- 🚧 A guest's seat (Lair rewrite D5): name the character you'll
|
|
606
649
|
play, or bring a persona. Their lines are that character's turns. -->
|
|
607
|
-
<div data-widget-part="messages.join" data-join="seat">
|
|
608
|
-
<div data-widget-part="messages.join-text">
|
|
609
|
-
<sp-icon name="armchair" size="48" data-widget-part="messages.join-icon"></sp-icon>
|
|
610
|
-
<h3 data-widget-part="messages.join-title">Take a seat</h3>
|
|
611
|
-
<p data-widget-part="messages.join-note">
|
|
650
|
+
<div data-widget-part="messages.join composer.join" data-join="seat">
|
|
651
|
+
<div data-widget-part="messages.join-text composer.join-text">
|
|
652
|
+
<sp-icon name="armchair" size="48" data-widget-part="messages.join-icon composer.join-icon"></sp-icon>
|
|
653
|
+
<h3 data-widget-part="messages.join-title composer.join-title">Take a seat</h3>
|
|
654
|
+
<p data-widget-part="messages.join-note composer.join-note">
|
|
612
655
|
Name the character you'll play. What you write is their turn.
|
|
613
656
|
</p>
|
|
614
657
|
</div>
|
|
615
|
-
<div data-widget-part="messages.join-seat">
|
|
658
|
+
<div data-widget-part="messages.join-seat composer.join-seat">
|
|
616
659
|
<input
|
|
617
660
|
type="text"
|
|
618
|
-
data-widget-part="messages.join-name"
|
|
661
|
+
data-widget-part="messages.join-name composer.join-name"
|
|
619
662
|
aria-label="Your character's name"
|
|
620
663
|
placeholder="Your character's name"
|
|
621
664
|
value={seatName}
|
|
@@ -629,7 +672,7 @@
|
|
|
629
672
|
/>
|
|
630
673
|
<button
|
|
631
674
|
type="button"
|
|
632
|
-
data-widget-part="messages.join-button"
|
|
675
|
+
data-widget-part="messages.join-button composer.join-button"
|
|
633
676
|
disabled={!seatName.trim()}
|
|
634
677
|
onclick={() => void takeSeat()}
|
|
635
678
|
>
|
|
@@ -638,11 +681,11 @@
|
|
|
638
681
|
</button>
|
|
639
682
|
</div>
|
|
640
683
|
{#if seatRefusal}
|
|
641
|
-
<p data-widget-part="messages.join-refusal" role="alert">{seatRefusal}</p>
|
|
684
|
+
<p data-widget-part="messages.join-refusal composer.join-refusal" role="alert">{seatRefusal}</p>
|
|
642
685
|
{/if}
|
|
643
686
|
<button
|
|
644
687
|
type="button"
|
|
645
|
-
data-widget-part="messages.join-alternative"
|
|
688
|
+
data-widget-part="messages.join-alternative composer.join-alternative"
|
|
646
689
|
onclick={() => void conv.request("add-persona", {})}
|
|
647
690
|
>
|
|
648
691
|
Play one of your personas instead
|
|
@@ -652,16 +695,16 @@
|
|
|
652
695
|
<!-- Guests without a persona get the one thing they can do here —
|
|
653
696
|
unless the genre closed this composer: its waiting reason wins
|
|
654
697
|
(2026-10-16). -->
|
|
655
|
-
<div data-widget-part="messages.join">
|
|
656
|
-
<div data-widget-part="messages.join-text">
|
|
657
|
-
<sp-icon name="user-plus" size="48" data-widget-part="messages.join-icon"></sp-icon>
|
|
658
|
-
<h3 data-widget-part="messages.join-title">Join the conversation</h3>
|
|
659
|
-
<p data-widget-part="messages.join-note">
|
|
698
|
+
<div data-widget-part="messages.join composer.join">
|
|
699
|
+
<div data-widget-part="messages.join-text composer.join-text">
|
|
700
|
+
<sp-icon name="user-plus" size="48" data-widget-part="messages.join-icon composer.join-icon"></sp-icon>
|
|
701
|
+
<h3 data-widget-part="messages.join-title composer.join-title">Join the conversation</h3>
|
|
702
|
+
<p data-widget-part="messages.join-note composer.join-note">
|
|
660
703
|
Add a persona to this session to send messages.
|
|
661
704
|
</p>
|
|
662
705
|
</div>
|
|
663
706
|
<button
|
|
664
|
-
data-widget-part="messages.join-button"
|
|
707
|
+
data-widget-part="messages.join-button composer.join-button"
|
|
665
708
|
onclick={() => void conv.request("add-persona", {})}
|
|
666
709
|
>
|
|
667
710
|
<sp-icon name="user-plus" size="20"></sp-icon>
|
|
@@ -678,10 +721,10 @@
|
|
|
678
721
|
is the footer's (polish parity L1, 2026-10-24: the composer is one
|
|
679
722
|
row at rest — persona · Actions · attach · preview · more · Send). -->
|
|
680
723
|
{#if actionsLabelShown && actionsOpen}
|
|
681
|
-
<div data-widget-part="messages.composer-disclosure">
|
|
724
|
+
<div data-widget-part="messages.composer-disclosure composer.disclosure">
|
|
682
725
|
<div
|
|
683
726
|
id={actionsId}
|
|
684
|
-
data-widget-part="messages.composer-actions-row"
|
|
727
|
+
data-widget-part="messages.composer-actions-row composer.actions-row"
|
|
685
728
|
role="group"
|
|
686
729
|
aria-label="Session actions"
|
|
687
730
|
>
|
|
@@ -691,7 +734,7 @@
|
|
|
691
734
|
draw their chips straight into this row (the row lays out
|
|
692
735
|
`sp-host-view`'s children as its own), so they wrap, space
|
|
693
736
|
and look as one set. -->
|
|
694
|
-
<div data-widget-part="messages.composer-actions messages.composer-chips">
|
|
737
|
+
<div data-widget-part="messages.composer-actions composer.actions messages.composer-chips composer.chips">
|
|
695
738
|
{#if turnControls}
|
|
696
739
|
<!-- This composer's channel's turn controls (S1): a copy pinned to the
|
|
697
740
|
Sanctum draws the Sanctum's listing. -->
|
|
@@ -725,7 +768,7 @@
|
|
|
725
768
|
<button
|
|
726
769
|
slot="trigger"
|
|
727
770
|
type="button"
|
|
728
|
-
data-widget-part="messages.composer-more-actions"
|
|
771
|
+
data-widget-part="messages.composer-more-actions composer.more-actions"
|
|
729
772
|
title={overflowNew.length
|
|
730
773
|
? `More actions (${overflowNew.length} new)`
|
|
731
774
|
: "More actions"}
|
|
@@ -736,7 +779,7 @@
|
|
|
736
779
|
<sp-icon name="ellipsis" size="14"></sp-icon>
|
|
737
780
|
More
|
|
738
781
|
{#if overflowNew.length}
|
|
739
|
-
<span data-widget-part="messages.composer-new-dot" aria-hidden="true"></span>
|
|
782
|
+
<span data-widget-part="messages.composer-new-dot composer.new-dot" aria-hidden="true"></span>
|
|
740
783
|
{/if}
|
|
741
784
|
</button>
|
|
742
785
|
{#each overflowActions as a (actionIdentity(a))}
|
|
@@ -752,18 +795,18 @@
|
|
|
752
795
|
<sp-menu-item
|
|
753
796
|
value={actionIdentity(a)}
|
|
754
797
|
disabled={row.disabled || !!closed}
|
|
755
|
-
data-widget-part="messages.composer-overflow-item"
|
|
798
|
+
data-widget-part="messages.composer-overflow-item composer.overflow-item"
|
|
756
799
|
>
|
|
757
800
|
<sp-icon name={iconName} size="12"></sp-icon>
|
|
758
801
|
<span title={a.description}>
|
|
759
802
|
{a.name}
|
|
760
|
-
<span data-widget-part="messages.composer-overflow-slash">/{a.slash}</span>
|
|
803
|
+
<span data-widget-part="messages.composer-overflow-slash composer.overflow-slash">/{a.slash}</span>
|
|
761
804
|
{#if row.reason}
|
|
762
|
-
<span data-widget-part="messages.composer-overflow-note">{row.reason}</span>
|
|
805
|
+
<span data-widget-part="messages.composer-overflow-note composer.overflow-note">{row.reason}</span>
|
|
763
806
|
{/if}
|
|
764
807
|
</span>
|
|
765
808
|
{#if a.isNew || overflowNewOnOpen.has(actionIdentity(a))}
|
|
766
|
-
<span data-widget-part="messages.composer-new">New</span>
|
|
809
|
+
<span data-widget-part="messages.composer-new composer.new">New</span>
|
|
767
810
|
{/if}
|
|
768
811
|
</sp-menu-item>
|
|
769
812
|
{/each}
|
|
@@ -779,7 +822,7 @@
|
|
|
779
822
|
Off where the host offers no attachments, so a paste of text is
|
|
780
823
|
the field's as ever. -->
|
|
781
824
|
<sp-drop-zone
|
|
782
|
-
data-widget-part="messages.composer-drop"
|
|
825
|
+
data-widget-part="messages.composer-drop composer.drop"
|
|
783
826
|
label="Drop to attach"
|
|
784
827
|
disabled={!offersAttachments}
|
|
785
828
|
onfiles={(e: CustomEvent<{ files: File[] }>) => {
|
|
@@ -790,12 +833,12 @@
|
|
|
790
833
|
void attachFiles(e.detail.files)
|
|
791
834
|
}}
|
|
792
835
|
>
|
|
793
|
-
<div data-widget-part="messages.composer-card">
|
|
836
|
+
<div data-widget-part="messages.composer-card composer.card">
|
|
794
837
|
{#if usageRatio !== null}
|
|
795
838
|
<!-- The draft's share of the context window, read along the card's
|
|
796
839
|
top edge rather than as a number, so it costs no row. -->
|
|
797
840
|
<div
|
|
798
|
-
data-widget-part="messages.composer-meter"
|
|
841
|
+
data-widget-part="messages.composer-meter composer.meter"
|
|
799
842
|
role="progressbar"
|
|
800
843
|
aria-label="Context window used"
|
|
801
844
|
aria-valuemin={0}
|
|
@@ -803,23 +846,23 @@
|
|
|
803
846
|
aria-valuenow={Math.round(usageRatio * 100)}
|
|
804
847
|
>
|
|
805
848
|
<div
|
|
806
|
-
data-widget-part="messages.composer-meter-fill"
|
|
849
|
+
data-widget-part="messages.composer-meter-fill composer.meter-fill"
|
|
807
850
|
data-high={usageRatio > 0.9 ? "" : undefined}
|
|
808
851
|
style="--sp-fill: {(usageRatio * 100).toFixed(1)}%"
|
|
809
852
|
></div>
|
|
810
853
|
</div>
|
|
811
854
|
{/if}
|
|
812
855
|
|
|
813
|
-
<div data-widget-part="messages.composer-body">
|
|
856
|
+
<div data-widget-part="messages.composer-body composer.body">
|
|
814
857
|
{#if activePane}
|
|
815
|
-
<div data-widget-part="messages.composer-pane-head">
|
|
816
|
-
<span data-widget-part="messages.composer-pane-title">
|
|
858
|
+
<div data-widget-part="messages.composer-pane-head composer.pane-head">
|
|
859
|
+
<span data-widget-part="messages.composer-pane-title composer.pane-title">
|
|
817
860
|
{activePane.title}
|
|
818
861
|
</span>
|
|
819
862
|
{#if !hideCompose}
|
|
820
863
|
<button
|
|
821
864
|
type="button"
|
|
822
|
-
data-widget-part="messages.composer-back"
|
|
865
|
+
data-widget-part="messages.composer-back composer.back"
|
|
823
866
|
onclick={backToCompose}
|
|
824
867
|
>
|
|
825
868
|
<sp-icon name="arrow-left" size="14"></sp-icon>
|
|
@@ -832,7 +875,7 @@
|
|
|
832
875
|
</div>
|
|
833
876
|
{:else if previewOpen}
|
|
834
877
|
<div
|
|
835
|
-
data-widget-part="messages.composer-preview"
|
|
878
|
+
data-widget-part="messages.composer-preview composer.preview"
|
|
836
879
|
role="region"
|
|
837
880
|
aria-label="Message preview"
|
|
838
881
|
>
|
|
@@ -846,7 +889,7 @@
|
|
|
846
889
|
completes the name. -->
|
|
847
890
|
<ul
|
|
848
891
|
id={paletteId}
|
|
849
|
-
data-widget-part="messages.composer-palette"
|
|
892
|
+
data-widget-part="messages.composer-palette composer.palette"
|
|
850
893
|
role="listbox"
|
|
851
894
|
aria-label="Slash commands"
|
|
852
895
|
>
|
|
@@ -864,11 +907,11 @@
|
|
|
864
907
|
role="option"
|
|
865
908
|
aria-selected={i === paletteHighlight}
|
|
866
909
|
aria-disabled={rowState.disabled}
|
|
867
|
-
data-widget-part="messages.composer-palette-row"
|
|
910
|
+
data-widget-part="messages.composer-palette-row composer.palette-row"
|
|
868
911
|
>
|
|
869
912
|
<button
|
|
870
913
|
type="button"
|
|
871
|
-
data-widget-part="messages.composer-palette-button"
|
|
914
|
+
data-widget-part="messages.composer-palette-button composer.palette-button"
|
|
872
915
|
tabindex="-1"
|
|
873
916
|
disabled={rowState.disabled}
|
|
874
917
|
onmousedown={(e) => e.preventDefault()}
|
|
@@ -876,17 +919,17 @@
|
|
|
876
919
|
onclick={() => invokePalette(a)}
|
|
877
920
|
>
|
|
878
921
|
<sp-icon name={iconName} size="14"></sp-icon>
|
|
879
|
-
<span data-widget-part="messages.composer-palette-slash">/{a.slash}</span>
|
|
922
|
+
<span data-widget-part="messages.composer-palette-slash composer.palette-slash">/{a.slash}</span>
|
|
880
923
|
{#if argHint}
|
|
881
924
|
<!-- The argument it takes (S2): `/nudge <direction…>`. -->
|
|
882
|
-
<span data-widget-part="messages.composer-palette-argument">{argHint}</span>
|
|
925
|
+
<span data-widget-part="messages.composer-palette-argument composer.palette-argument">{argHint}</span>
|
|
883
926
|
{/if}
|
|
884
|
-
<span data-widget-part="messages.composer-palette-label">{a.name}</span>
|
|
927
|
+
<span data-widget-part="messages.composer-palette-label composer.palette-label">{a.name}</span>
|
|
885
928
|
{#if a.isNew || paletteNewOnOpen.has(actionIdentity(a))}
|
|
886
|
-
<span data-widget-part="messages.composer-new">New</span>
|
|
929
|
+
<span data-widget-part="messages.composer-new composer.new">New</span>
|
|
887
930
|
{/if}
|
|
888
931
|
{#if rowState.reason}
|
|
889
|
-
<span data-widget-part="messages.composer-palette-note">{rowState.reason}</span>
|
|
932
|
+
<span data-widget-part="messages.composer-palette-note composer.palette-note">{rowState.reason}</span>
|
|
890
933
|
{/if}
|
|
891
934
|
</button>
|
|
892
935
|
</li>
|
|
@@ -897,7 +940,7 @@
|
|
|
897
940
|
host element; the field itself is its child `textarea`. -->
|
|
898
941
|
<!-- svelte-ignore a11y_aria_activedescendant_has_tabindex -->
|
|
899
942
|
<sp-composer-field
|
|
900
|
-
data-widget-part="messages.composer-field"
|
|
943
|
+
data-widget-part="messages.composer-field composer.field"
|
|
901
944
|
rows="1"
|
|
902
945
|
label="Write a message"
|
|
903
946
|
{placeholder}
|
|
@@ -927,16 +970,16 @@
|
|
|
927
970
|
{#if offersAttachments && (tray.length || refusedHere.length)}
|
|
928
971
|
<!-- The tray: this line's attachments, uploading, ready or
|
|
929
972
|
refused. A row of tiles that scrolls sideways on a phone. -->
|
|
930
|
-
<ul data-widget-part="messages.composer-tray" aria-label="Attachments">
|
|
973
|
+
<ul data-widget-part="messages.composer-tray composer.tray" aria-label="Attachments">
|
|
931
974
|
{#each tray as t (t.id)}
|
|
932
975
|
<li
|
|
933
|
-
data-widget-part="messages.composer-tray-item"
|
|
976
|
+
data-widget-part="messages.composer-tray-item composer.tray-item"
|
|
934
977
|
data-status={t.status}
|
|
935
978
|
data-kind={t.kind ?? undefined}
|
|
936
979
|
>
|
|
937
980
|
{#if t.thumbSrc}
|
|
938
981
|
<img
|
|
939
|
-
data-widget-part="messages.composer-tray-thumb"
|
|
982
|
+
data-widget-part="messages.composer-tray-thumb composer.tray-thumb"
|
|
940
983
|
src={t.thumbSrc}
|
|
941
984
|
alt=""
|
|
942
985
|
loading="lazy"
|
|
@@ -944,7 +987,7 @@
|
|
|
944
987
|
/>
|
|
945
988
|
{:else}
|
|
946
989
|
<sp-icon
|
|
947
|
-
data-widget-part="messages.composer-tray-icon"
|
|
990
|
+
data-widget-part="messages.composer-tray-icon composer.tray-icon"
|
|
948
991
|
name={t.kind === "image"
|
|
949
992
|
? "image"
|
|
950
993
|
: t.kind === "audio"
|
|
@@ -955,11 +998,11 @@
|
|
|
955
998
|
size="20"
|
|
956
999
|
></sp-icon>
|
|
957
1000
|
{/if}
|
|
958
|
-
<span data-widget-part="messages.composer-tray-name" title={t.filename}>{t.filename}</span>
|
|
1001
|
+
<span data-widget-part="messages.composer-tray-name composer.tray-name" title={t.filename}>{t.filename}</span>
|
|
959
1002
|
{#if t.status === "ready" && t.kind === "audio" && t.previewSrc}
|
|
960
1003
|
<!-- 🚧 O11: play an attached sound before sending it. -->
|
|
961
1004
|
<audio
|
|
962
|
-
data-widget-part="messages.composer-tray-audio"
|
|
1005
|
+
data-widget-part="messages.composer-tray-audio composer.tray-audio"
|
|
963
1006
|
controls
|
|
964
1007
|
preload="none"
|
|
965
1008
|
src={t.previewSrc}
|
|
@@ -968,7 +1011,7 @@
|
|
|
968
1011
|
{/if}
|
|
969
1012
|
{#if t.status === "uploading"}
|
|
970
1013
|
<span
|
|
971
|
-
data-widget-part="messages.composer-tray-progress"
|
|
1014
|
+
data-widget-part="messages.composer-tray-progress composer.tray-progress"
|
|
972
1015
|
role="progressbar"
|
|
973
1016
|
aria-label="Uploading {t.filename}"
|
|
974
1017
|
aria-valuemin={0}
|
|
@@ -977,11 +1020,11 @@
|
|
|
977
1020
|
style="--sp-fill: {progressOf(t)}%"
|
|
978
1021
|
></span>
|
|
979
1022
|
{:else if t.status === "refused"}
|
|
980
|
-
<span data-widget-part="messages.composer-tray-refusal">{t.refusal ?? "Not attached."}</span>
|
|
1023
|
+
<span data-widget-part="messages.composer-tray-refusal composer.tray-refusal">{t.refusal ?? "Not attached."}</span>
|
|
981
1024
|
{/if}
|
|
982
1025
|
<button
|
|
983
1026
|
type="button"
|
|
984
|
-
data-widget-part="messages.composer-tray-remove"
|
|
1027
|
+
data-widget-part="messages.composer-tray-remove composer.tray-remove"
|
|
985
1028
|
aria-label="Remove {t.filename}"
|
|
986
1029
|
title="Remove"
|
|
987
1030
|
onclick={() => removeTrayItem(t)}
|
|
@@ -991,60 +1034,60 @@
|
|
|
991
1034
|
</li>
|
|
992
1035
|
{/each}
|
|
993
1036
|
{#each refusedHere as r (r.key)}
|
|
994
|
-
<li data-widget-part="messages.composer-tray-item" data-status="refused">
|
|
995
|
-
<sp-icon data-widget-part="messages.composer-tray-icon" name="ban" size="20"></sp-icon>
|
|
996
|
-
<span data-widget-part="messages.composer-tray-name" title={r.filename}>{r.filename}</span>
|
|
997
|
-
<span data-widget-part="messages.composer-tray-refusal">{r.reason}</span>
|
|
1037
|
+
<li data-widget-part="messages.composer-tray-item composer.tray-item" data-status="refused">
|
|
1038
|
+
<sp-icon data-widget-part="messages.composer-tray-icon composer.tray-icon" name="ban" size="20"></sp-icon>
|
|
1039
|
+
<span data-widget-part="messages.composer-tray-name composer.tray-name" title={r.filename}>{r.filename}</span>
|
|
1040
|
+
<span data-widget-part="messages.composer-tray-refusal composer.tray-refusal">{r.reason}</span>
|
|
998
1041
|
</li>
|
|
999
1042
|
{/each}
|
|
1000
1043
|
</ul>
|
|
1001
1044
|
{/if}
|
|
1002
|
-
<div data-widget-part="messages.composer-footer">
|
|
1045
|
+
<div data-widget-part="messages.composer-footer composer.footer">
|
|
1003
1046
|
<!-- 🚧 Which channel this line lands on is the widget's channel tabs
|
|
1004
1047
|
now (lair fix 2, `messages.channel-tabs` above the log): the
|
|
1005
1048
|
composer writes on the tab shown. -->
|
|
1006
|
-
{#if
|
|
1007
|
-
{#if
|
|
1049
|
+
{#if activeEntry}
|
|
1050
|
+
{#if entryCount > 1}
|
|
1008
1051
|
<!-- `sp-popover` (§3.5): our button is the trigger, the card the panel. -->
|
|
1009
1052
|
<sp-popover
|
|
1010
1053
|
placement="top-start"
|
|
1011
1054
|
open={personaSwitcherOpen}
|
|
1012
1055
|
onopen-change={(e: CustomEvent<{ open: boolean }>) => (personaSwitcherOpen = e.detail.open)}
|
|
1013
1056
|
>
|
|
1014
|
-
<button slot="trigger" type="button" data-widget-part="messages.composer-persona"
|
|
1057
|
+
<button slot="trigger" type="button" data-widget-part="messages.composer-persona composer.persona"
|
|
1015
1058
|
title="Switch persona"
|
|
1016
|
-
aria-label="Switch persona (currently {
|
|
1017
|
-
<sp-avatar ref={
|
|
1018
|
-
<span data-widget-part="messages.composer-persona-name">
|
|
1019
|
-
{
|
|
1059
|
+
aria-label="Switch persona (currently {activeEntry.name})">
|
|
1060
|
+
<sp-avatar ref={activeEntry.avatarRef} size="sm"></sp-avatar>
|
|
1061
|
+
<span data-widget-part="messages.composer-persona-name composer.persona-name">
|
|
1062
|
+
{activeEntry.name}
|
|
1020
1063
|
</span>
|
|
1021
1064
|
<sp-icon name="chevron-down" size="14"></sp-icon>
|
|
1022
1065
|
</button>
|
|
1023
|
-
<div data-widget-part="messages.composer-persona-menu">
|
|
1024
|
-
<p data-widget-part="messages.composer-persona-menu-title">
|
|
1066
|
+
<div data-widget-part="messages.composer-persona-menu composer.persona-menu">
|
|
1067
|
+
<p data-widget-part="messages.composer-persona-menu-title composer.persona-menu-title">
|
|
1025
1068
|
Write as
|
|
1026
1069
|
</p>
|
|
1027
|
-
{#each
|
|
1070
|
+
{#each entries as e (e.key)}
|
|
1028
1071
|
<button
|
|
1029
1072
|
type="button"
|
|
1030
|
-
data-widget-part="messages.composer-persona-option"
|
|
1031
|
-
aria-current={
|
|
1073
|
+
data-widget-part="messages.composer-persona-option composer.persona-option"
|
|
1074
|
+
aria-current={e.active ? "true" : undefined}
|
|
1032
1075
|
onclick={() => {
|
|
1033
|
-
|
|
1076
|
+
e.choose()
|
|
1034
1077
|
personaSwitcherOpen = false
|
|
1035
1078
|
}}
|
|
1036
1079
|
>
|
|
1037
|
-
<sp-avatar ref={
|
|
1038
|
-
<span data-widget-part="messages.composer-persona-option-name">{
|
|
1080
|
+
<sp-avatar ref={e.avatarRef} size="sm"></sp-avatar>
|
|
1081
|
+
<span data-widget-part="messages.composer-persona-option-name composer.persona-option-name">{e.name}</span>
|
|
1039
1082
|
</button>
|
|
1040
1083
|
{/each}
|
|
1041
1084
|
</div>
|
|
1042
1085
|
</sp-popover>
|
|
1043
1086
|
{:else}
|
|
1044
|
-
<span data-widget-part="messages.composer-persona">
|
|
1045
|
-
<sp-avatar ref={
|
|
1046
|
-
<span data-widget-part="messages.composer-persona-name">
|
|
1047
|
-
{
|
|
1087
|
+
<span data-widget-part="messages.composer-persona composer.persona">
|
|
1088
|
+
<sp-avatar ref={activeEntry.avatarRef} size="sm"></sp-avatar>
|
|
1089
|
+
<span data-widget-part="messages.composer-persona-name composer.persona-name">
|
|
1090
|
+
{activeEntry.name}
|
|
1048
1091
|
</span>
|
|
1049
1092
|
</span>
|
|
1050
1093
|
{/if}
|
|
@@ -1056,21 +1099,21 @@
|
|
|
1056
1099
|
Escape, never because focus left it. -->
|
|
1057
1100
|
<button
|
|
1058
1101
|
type="button"
|
|
1059
|
-
data-widget-part="messages.composer-actions-toggle"
|
|
1102
|
+
data-widget-part="messages.composer-actions-toggle composer.actions-toggle"
|
|
1060
1103
|
aria-expanded={actionsOpen}
|
|
1061
1104
|
aria-controls={actionsId}
|
|
1062
1105
|
onclick={() => (actionsOpen = !actionsOpen)}
|
|
1063
1106
|
>
|
|
1064
1107
|
<span>Actions</span>
|
|
1065
|
-
<sp-icon name="chevron-down" size="12" data-widget-part="messages.composer-actions-chevron"></sp-icon>
|
|
1108
|
+
<sp-icon name="chevron-down" size="12" data-widget-part="messages.composer-actions-chevron composer.actions-chevron"></sp-icon>
|
|
1066
1109
|
</button>
|
|
1067
1110
|
{/if}
|
|
1068
1111
|
|
|
1069
|
-
<div data-widget-part="messages.composer-footer-end">
|
|
1112
|
+
<div data-widget-part="messages.composer-footer-end composer.footer-end">
|
|
1070
1113
|
{#if ragVisible}
|
|
1071
1114
|
<!-- The retrieval notice (the page's view): a line the first
|
|
1072
1115
|
time a session shows it, an icon here after that. -->
|
|
1073
|
-
<span data-widget-part="messages.composer-notice">
|
|
1116
|
+
<span data-widget-part="messages.composer-notice composer.notice">
|
|
1074
1117
|
<sp-host-view name="retrieval-notice"></sp-host-view>
|
|
1075
1118
|
</span>
|
|
1076
1119
|
{/if}
|
|
@@ -1079,14 +1122,14 @@
|
|
|
1079
1122
|
reads. Its body is our own button; the picker is the
|
|
1080
1123
|
page's (`sp-file-picker`). -->
|
|
1081
1124
|
<sp-file-picker
|
|
1082
|
-
data-widget-part="messages.composer-attach"
|
|
1125
|
+
data-widget-part="messages.composer-attach composer.attach"
|
|
1083
1126
|
accept={pickerAccept || undefined}
|
|
1084
1127
|
multiple={true}
|
|
1085
1128
|
onfiles={(e: CustomEvent<{ files: File[] }>) => void attachFiles(e.detail.files)}
|
|
1086
1129
|
>
|
|
1087
1130
|
<button
|
|
1088
1131
|
type="button"
|
|
1089
|
-
data-widget-part="messages.composer-attach-button messages.composer-icon-button"
|
|
1132
|
+
data-widget-part="messages.composer-attach-button composer.attach-button messages.composer-icon-button composer.icon-button"
|
|
1090
1133
|
title={readersLine ? `Attach files. ${readersLine}` : "Attach files"}
|
|
1091
1134
|
aria-label="Attach files"
|
|
1092
1135
|
>
|
|
@@ -1097,7 +1140,7 @@
|
|
|
1097
1140
|
{#if !hideCompose}
|
|
1098
1141
|
<button
|
|
1099
1142
|
type="button"
|
|
1100
|
-
data-widget-part="messages.composer-preview-toggle messages.composer-icon-button"
|
|
1143
|
+
data-widget-part="messages.composer-preview-toggle composer.preview-toggle messages.composer-icon-button composer.icon-button"
|
|
1101
1144
|
aria-pressed={previewOpen}
|
|
1102
1145
|
title="Preview"
|
|
1103
1146
|
aria-label="Preview the formatted draft"
|
|
@@ -1107,32 +1150,44 @@
|
|
|
1107
1150
|
</button>
|
|
1108
1151
|
{/if}
|
|
1109
1152
|
|
|
1110
|
-
{#if morePanes.length
|
|
1153
|
+
{#if morePanes.length === 0 && readersOffered}
|
|
1154
|
+
<!-- A menu of one item is the item: What can be attached opens
|
|
1155
|
+
the readers dialog (note 41) from its own button. -->
|
|
1156
|
+
<button
|
|
1157
|
+
type="button"
|
|
1158
|
+
data-widget-part="messages.composer-icon-button composer.icon-button messages.composer-readers-button composer.readers-button"
|
|
1159
|
+
title="What can be attached"
|
|
1160
|
+
aria-label="What can be attached"
|
|
1161
|
+
onclick={openReaders}
|
|
1162
|
+
>
|
|
1163
|
+
<sp-icon name="circle-help" size="16"></sp-icon>
|
|
1164
|
+
</button>
|
|
1165
|
+
{:else if morePanes.length > 0}
|
|
1111
1166
|
<!-- `sp-popover` (§3.5): our button is the trigger, the card the panel.
|
|
1112
1167
|
A panel filling the field area marks it `data-active`. Under
|
|
1113
1168
|
the panes, **What can be attached** opens the readers dialog
|
|
1114
|
-
(note 41)
|
|
1169
|
+
(note 41); with no panes it is its own button (above). -->
|
|
1115
1170
|
<sp-popover
|
|
1116
1171
|
placement="top-end"
|
|
1117
1172
|
open={moreMenuOpen}
|
|
1118
1173
|
onopen-change={(e: CustomEvent<{ open: boolean }>) => (moreMenuOpen = e.detail.open)}
|
|
1119
1174
|
>
|
|
1120
|
-
<button slot="trigger" type="button" data-widget-part="messages.composer-more messages.composer-icon-button"
|
|
1175
|
+
<button slot="trigger" type="button" data-widget-part="messages.composer-more composer.more messages.composer-icon-button composer.icon-button"
|
|
1121
1176
|
data-active={activePane ? "" : undefined}
|
|
1122
1177
|
title="More"
|
|
1123
1178
|
aria-label="More">
|
|
1124
1179
|
<sp-icon name="ellipsis-vertical" size="16"></sp-icon>
|
|
1125
1180
|
</button>
|
|
1126
|
-
<div data-widget-part="messages.composer-panes">
|
|
1127
|
-
<header data-widget-part="messages.composer-panes-title">
|
|
1181
|
+
<div data-widget-part="messages.composer-panes composer.panes">
|
|
1182
|
+
<header data-widget-part="messages.composer-panes-title composer.panes-title">
|
|
1128
1183
|
<sp-icon name="ellipsis-vertical" size="16"></sp-icon>
|
|
1129
1184
|
<p>More</p>
|
|
1130
1185
|
</header>
|
|
1131
|
-
<div data-widget-part="messages.composer-panes-list">
|
|
1186
|
+
<div data-widget-part="messages.composer-panes-list composer.panes-list">
|
|
1132
1187
|
{#each morePanes as pane (pane.view)}
|
|
1133
1188
|
<button
|
|
1134
1189
|
type="button"
|
|
1135
|
-
data-widget-part="messages.composer-pane-option"
|
|
1190
|
+
data-widget-part="messages.composer-pane-option composer.pane-option"
|
|
1136
1191
|
data-current={activePaneValue === pane.view ? "" : undefined}
|
|
1137
1192
|
onclick={() =>
|
|
1138
1193
|
openPane(pane.view)}
|
|
@@ -1144,7 +1199,7 @@
|
|
|
1144
1199
|
{#if readersOffered}
|
|
1145
1200
|
<button
|
|
1146
1201
|
type="button"
|
|
1147
|
-
data-widget-part="messages.composer-pane-option messages.composer-readers-button"
|
|
1202
|
+
data-widget-part="messages.composer-pane-option composer.pane-option messages.composer-readers-button composer.readers-button"
|
|
1148
1203
|
onclick={openReaders}
|
|
1149
1204
|
>
|
|
1150
1205
|
<sp-icon name="paperclip" size="12"></sp-icon>
|
|
@@ -1156,11 +1211,11 @@
|
|
|
1156
1211
|
</sp-popover>
|
|
1157
1212
|
{/if}
|
|
1158
1213
|
|
|
1159
|
-
{#if !hideCompose}
|
|
1214
|
+
{#if !hideCompose && composerSendShown(showSend, conv.ctx.layout?.v1?.tier)}
|
|
1160
1215
|
{#if isGenerating}
|
|
1161
1216
|
<button
|
|
1162
1217
|
type="button"
|
|
1163
|
-
data-widget-part="messages.composer-stop"
|
|
1218
|
+
data-widget-part="messages.composer-stop composer.stop"
|
|
1164
1219
|
title="Stop"
|
|
1165
1220
|
aria-label="Stop generating"
|
|
1166
1221
|
onclick={() => conv.invoke("stop")}
|
|
@@ -1172,7 +1227,7 @@
|
|
|
1172
1227
|
<!-- Someone due next (`data-someone-due`): Send steps back. -->
|
|
1173
1228
|
<button
|
|
1174
1229
|
type="button"
|
|
1175
|
-
data-widget-part="messages.composer-send"
|
|
1230
|
+
data-widget-part="messages.composer-send composer.send"
|
|
1176
1231
|
data-someone-due={sendTonal ? "" : undefined}
|
|
1177
1232
|
disabled={!!closed || (!draft.trim() && !hasAttachments)}
|
|
1178
1233
|
title={closed ? composerClosedPlaceholder(closed) : "Send"}
|
|
@@ -1191,7 +1246,7 @@
|
|
|
1191
1246
|
|
|
1192
1247
|
{#if offersAttachments}
|
|
1193
1248
|
<!-- Attachments said aloud: "cat.png attached", a refusal, a removal. -->
|
|
1194
|
-
<p data-widget-part="messages.composer-announce" aria-live="polite">{announcement}</p>
|
|
1249
|
+
<p data-widget-part="messages.composer-announce composer.announce" aria-live="polite">{announcement}</p>
|
|
1195
1250
|
{/if}
|
|
1196
1251
|
{#if readersOffered}
|
|
1197
1252
|
<!-- What this reply can read (§3.2; note 41): out of the composer's
|
|
@@ -1205,26 +1260,26 @@
|
|
|
1205
1260
|
onopen-change={(e: CustomEvent<{ open: boolean }>) => (readersOpen = e.detail.open)}
|
|
1206
1261
|
>
|
|
1207
1262
|
<span slot="title">What can be attached</span>
|
|
1208
|
-
<div data-widget-part="messages.composer-readers">
|
|
1209
|
-
<p data-widget-part="messages.composer-readers-line">{readersLine}</p>
|
|
1210
|
-
<ul data-widget-part="messages.composer-readers-kinds" aria-label="Kinds of file">
|
|
1263
|
+
<div data-widget-part="messages.composer-readers composer.readers">
|
|
1264
|
+
<p data-widget-part="messages.composer-readers-line composer.readers-line">{readersLine}</p>
|
|
1265
|
+
<ul data-widget-part="messages.composer-readers-kinds composer.readers-kinds" aria-label="Kinds of file">
|
|
1211
1266
|
<!-- Every kind the host answered for (O1: a kind with no
|
|
1212
1267
|
row is not offered, and not listed). -->
|
|
1213
1268
|
{#each ATTACHMENT_KINDS_V1.filter((k) => !readers || readers.kinds[k]) as k (k)}
|
|
1214
1269
|
{@const v = readers?.kinds[k]}
|
|
1215
|
-
<li data-widget-part="messages.composer-readers-kind" data-allowed={v?.allowed ? "" : undefined}>
|
|
1270
|
+
<li data-widget-part="messages.composer-readers-kind composer.readers-kind" data-allowed={v?.allowed ? "" : undefined}>
|
|
1216
1271
|
<strong>{KIND_NAME[k]}</strong>
|
|
1217
1272
|
<span>({KIND_FORMATS[k]})</span>
|
|
1218
1273
|
{#if v?.allowed}
|
|
1219
1274
|
<span> — can be attached</span>
|
|
1220
1275
|
{:else}
|
|
1221
|
-
<span data-widget-part="messages.composer-readers-reason"> — can't be attached. {v?.reason ?? ""}</span>
|
|
1276
|
+
<span data-widget-part="messages.composer-readers-reason composer.readers-reason"> — can't be attached. {v?.reason ?? ""}</span>
|
|
1222
1277
|
{/if}
|
|
1223
1278
|
</li>
|
|
1224
1279
|
{/each}
|
|
1225
1280
|
</ul>
|
|
1226
1281
|
{#if readerLines.length}
|
|
1227
|
-
<ul data-widget-part="messages.composer-readers-calls" aria-label="Each model call">
|
|
1282
|
+
<ul data-widget-part="messages.composer-readers-calls composer.readers-calls" aria-label="Each model call">
|
|
1228
1283
|
{#each readerLines as line (line)}
|
|
1229
1284
|
<li>{line}</li>
|
|
1230
1285
|
{/each}
|
|
@@ -1234,13 +1289,13 @@
|
|
|
1234
1289
|
</sp-dialog>
|
|
1235
1290
|
{/if}
|
|
1236
1291
|
{#if sendWaiting && uploading}
|
|
1237
|
-
<p data-widget-part="messages.composer-hint" aria-live="polite">{uploading} Sends when done.</p>
|
|
1292
|
+
<p data-widget-part="messages.composer-hint composer.hint" aria-live="polite">{uploading} Sends when done.</p>
|
|
1238
1293
|
{/if}
|
|
1239
1294
|
|
|
1240
1295
|
{#if contextExceeded}
|
|
1241
1296
|
<p
|
|
1242
1297
|
id={warningId}
|
|
1243
|
-
data-widget-part="messages.composer-warning"
|
|
1298
|
+
data-widget-part="messages.composer-warning composer.warning"
|
|
1244
1299
|
role="alert"
|
|
1245
1300
|
>
|
|
1246
1301
|
This draft pushes the prompt past the context limit. Older turns
|
|
@@ -1252,41 +1307,41 @@
|
|
|
1252
1307
|
<!-- While the palette is open Enter does not send: it runs the
|
|
1253
1308
|
row it would pick (the same derivation the key handler reads),
|
|
1254
1309
|
or — a bare `/` with nothing highlighted — only highlights. -->
|
|
1255
|
-
<p data-widget-part="messages.composer-hint" aria-live="polite">
|
|
1256
|
-
<kbd data-widget-part="messages.composer-key">Enter</kbd>
|
|
1310
|
+
<p data-widget-part="messages.composer-hint composer.hint" aria-live="polite">
|
|
1311
|
+
<kbd data-widget-part="messages.composer-key composer.key">Enter</kbd>
|
|
1257
1312
|
{#if paletteEnterPick}
|
|
1258
1313
|
runs /{paletteEnterPick.slash}
|
|
1259
1314
|
{:else}
|
|
1260
1315
|
highlights the first ·
|
|
1261
|
-
<kbd data-widget-part="messages.composer-key">↑</kbd>
|
|
1262
|
-
<kbd data-widget-part="messages.composer-key">↓</kbd>
|
|
1316
|
+
<kbd data-widget-part="messages.composer-key composer.key">↑</kbd>
|
|
1317
|
+
<kbd data-widget-part="messages.composer-key composer.key">↓</kbd>
|
|
1263
1318
|
to choose
|
|
1264
1319
|
{/if}
|
|
1265
1320
|
·
|
|
1266
|
-
<kbd data-widget-part="messages.composer-key">Esc</kbd>
|
|
1321
|
+
<kbd data-widget-part="messages.composer-key composer.key">Esc</kbd>
|
|
1267
1322
|
closes.
|
|
1268
1323
|
</p>
|
|
1269
1324
|
{:else if slashCommand}
|
|
1270
1325
|
<!-- A whole slash name and its argument (S2): what Enter (or Send)
|
|
1271
1326
|
will do with it — or why it will not. -->
|
|
1272
1327
|
<p
|
|
1273
|
-
data-widget-part="messages.composer-hint"
|
|
1328
|
+
data-widget-part="messages.composer-hint composer.hint"
|
|
1274
1329
|
data-refused={slashRefusal ? "" : undefined}
|
|
1275
1330
|
aria-live="polite"
|
|
1276
1331
|
>
|
|
1277
1332
|
{#if slashRefusal}
|
|
1278
1333
|
{slashRefusal}.
|
|
1279
1334
|
{:else}
|
|
1280
|
-
<kbd data-widget-part="messages.composer-key">{submitOnEnter ? "Enter" : "Send"}</kbd>
|
|
1335
|
+
<kbd data-widget-part="messages.composer-key composer.key">{submitOnEnter ? "Enter" : "Send"}</kbd>
|
|
1281
1336
|
runs /{slashCommand.action.slash} with your text.
|
|
1282
1337
|
{/if}
|
|
1283
1338
|
</p>
|
|
1284
1339
|
{:else if hintVisible && submitOnEnter}
|
|
1285
|
-
<p data-widget-part="messages.composer-hint">
|
|
1286
|
-
<kbd data-widget-part="messages.composer-key">Enter</kbd>
|
|
1340
|
+
<p data-widget-part="messages.composer-hint composer.hint">
|
|
1341
|
+
<kbd data-widget-part="messages.composer-key composer.key">Enter</kbd>
|
|
1287
1342
|
sends.
|
|
1288
|
-
<kbd data-widget-part="messages.composer-key">Shift</kbd>
|
|
1289
|
-
<kbd data-widget-part="messages.composer-key">Enter</kbd>
|
|
1343
|
+
<kbd data-widget-part="messages.composer-key composer.key">Shift</kbd>
|
|
1344
|
+
<kbd data-widget-part="messages.composer-key composer.key">Enter</kbd>
|
|
1290
1345
|
for a new line.
|
|
1291
1346
|
</p>
|
|
1292
1347
|
{/if}
|