clavarium-parley 0.13.1 → 0.13.2

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 CHANGED
@@ -112,7 +112,7 @@ Two views of one exchange, and a person picks one:
112
112
  | Steps it went through | folded into the message they led to: a click on it opens them ("5 steps" is said with its time) | unfolded between the messages, each with its time and state |
113
113
  | Where it is | when it waits for the person: once, at the end of the thread, until they write; done: once, quietly, while it is the last thing that happened | the same; at the top, what it does now, or the state it said when the end does not say it; on the side, what it does now and its machine (`about`, given by the application) |
114
114
  | Its newest message | never folded nor cut: nothing seems left below it | unfolded |
115
- | Reactions | on its messages: a button on hover, a right click or a long press; eight, each with its word | the same |
115
+ | Reactions | on its messages: a button on hover (always there on a touch screen, in its corner), or a right click; a long press selects the text; eight, each with its word | the same |
116
116
  | Pictures | in their place, their title under them; several shown at once, one gallery; large: grown out of the thumbnail, zoomed, a strip of the others, closed with a tap; "Media and files" in the menu | the same, with each file's name |
117
117
  | Files | the ones the person can open, by name | every one, with its path; one that cannot be opened is said so |
118
118
  | Its terminal | | a way to it |
package/docs/protocol.md CHANGED
@@ -237,8 +237,9 @@ extension and dashes); the name of the file on hover and in the detailed view.
237
237
 
238
238
  ## Reactions, the media, the viewer
239
239
 
240
- A message of the agent takes a reaction: a button on hover, a right click, or
241
- a long press opens the set, each icon with its word under it and its meaning
240
+ A message of the agent takes a reaction: a button on hover (always in sight
241
+ on a touch screen, where a long press selects the text), or a right click,
242
+ opens the set, each icon with its word under it and its meaning
242
243
  on hover, and Reply. The icons are Lucide's (`ui/parley-icons.js`, copied with
243
244
  its version and licence, nothing loaded). "Media and files", in the menu of
244
245
  settings, shows every picture of the thread as a grid (the newest first) and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium-parley",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A bridge between a command-line agent and a screen of its own: a command and an MCP server of five verbs, and a small library that shows the exchange.",
@@ -33,7 +33,7 @@ import { fileURLToPath } from 'node:url';
33
33
  import { randomUUID } from 'node:crypto';
34
34
  import { createInterface } from 'node:readline';
35
35
 
36
- export const VERSION = '0.13.1';
36
+ export const VERSION = '0.13.2';
37
37
  /* A message may be long: the screen folds it, and shows its short version first. */
38
38
  export const TEXT_MAX = 16000;
39
39
  /* Its short version: a title of one or two lines. */
package/ui/parley-ui.css CHANGED
@@ -459,7 +459,11 @@ mark.parley-found[data-now="true"] { outline: 2px solid var(--parley-ask); }
459
459
  /* ---- reactions ---- */
460
460
  .parley .parley-react-open { position: absolute; top: 0; right: 0; min-height: 0; width: 2.2em; height: 2.2em; padding: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--parley-dim); background: var(--parley-bg); opacity: 0; transition: opacity .12s; }
461
461
  .parley-said:hover > .parley-react-open, .parley .parley-react-open:focus-visible, .parley-said[data-reveal="true"] > .parley-react-open { opacity: 1; }
462
- @media (hover: none) { .parley .parley-react-open { display: none; } }
462
+ /* A touch screen: no hover, so the button stays in sight, small, in the message's bottom corner (a long press selects its text). */
463
+ @media (hover: none) {
464
+ .parley .parley-react-open { top: auto; bottom: 0; opacity: .7; width: 2em; height: 2em; }
465
+ .parley .parley-said:has(> .parley-react-open) { padding-bottom: 1.9em; }
466
+ }
463
467
  .parley-react-open .parley-sign { width: 1.15em; height: 1.15em; }
464
468
  .parley .parley-reaction { display: inline-flex; align-items: center; gap: .35em; margin-top: .4em; min-height: 2em; padding: 0 .75em; border-radius: 999px; font-size: .85em; font-weight: 600; color: var(--parley-text); background: var(--parley-agent); }
465
469
  .parley .parley-reaction:disabled { opacity: 1; cursor: default; }
package/ui/parley-ui.js CHANGED
@@ -1625,7 +1625,7 @@ export function mount(root, { load, send, words = {}, open, terminal, remind, vi
1625
1625
  if (item.name && item.tool && item.tool !== item.name) head.append(el('span', 'parley-tool', item.tool));
1626
1626
  if (item.time) head.append(time(item.trail ? `${item.time} - ${item.trail.label}` : item.time, item.when));
1627
1627
  bubble.append(head);
1628
- /* React to it: a button that shows on hover (a right click, or a long press, too). */
1628
+ /* React to it: a button that shows on hover (a right click too); on a touch screen, always there, in its corner. */
1629
1629
  if (react && reactions.length && ['say', 'ask', 'show'].includes(item.kind)) {
1630
1630
  const r = el('button', 'parley-react-open'); r.type = 'button'; r.title = said(words, 'react'); r.setAttribute('aria-label', r.title); r.setAttribute('aria-haspopup', 'true');
1631
1631
  r.append(icon('smile-plus', 'parley-sign'));
@@ -1735,8 +1735,9 @@ export function mount(root, { load, send, words = {}, open, terminal, remind, vi
1735
1735
  /* REACTIONS: one choice over the page, near the message -- each icon with
1736
1736
  its word under it, its meaning on hover; the one standing is pressed,
1737
1737
  pressed again it is taken back. Reply is there too: what is typed next
1738
- answers that message. Opened by the button on the message, a right
1739
- click, or a long press. */
1738
+ answers that message. Opened by the button on the message (always in
1739
+ sight on a touch screen), or a right click. A long press is left to the
1740
+ browser: it selects the text, to copy it. */
1740
1741
  function reactionPicker() {
1741
1742
  const box = el('div', 'parley-react'); box.hidden = true; box.setAttribute('role', 'dialog'); box.setAttribute('aria-label', said(words, 'react')); box.tabIndex = -1;
1742
1743
  const grid = el('div', 'parley-react-grid');
@@ -2029,9 +2030,7 @@ export function mount(root, { load, send, words = {}, open, terminal, remind, vi
2029
2030
  if (!bubble || event.pointerType === 'mouse') return;
2030
2031
  unpress();
2031
2032
  pressing = setTimeout(() => {
2032
- /* On a message of the agent, a long press also offers its reactions. */
2033
- const item = bubble.dataset.from === 'agent' && react && reactions.length ? latestItems().find((i) => i.id === bubble.dataset.id && ['say', 'ask', 'show'].includes(i.kind)) : null;
2034
- if (item && !(event.target instanceof Element && event.target.closest('a, button, img'))) reacting.open(item, bubble);
2033
+ /* Its text stays the browser's to select: the reactions are its button's, in its corner. */
2035
2034
  for (const other of thread.querySelectorAll('.parley-said[data-reveal]')) delete other.dataset.reveal;
2036
2035
  bubble.dataset.reveal = 'true'; revealed = bubble.dataset.id ?? '';
2037
2036
  clearTimeout(hiding);