wiki-plugin-rcntimeline 0.3.3 → 0.3.4

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
@@ -48,6 +48,6 @@ Part of the [RCN toolset](https://github.com/marpie1/rcn), MIT.
48
48
 
49
49
  Marc Pierson and Claude Opus 5.5 · September 2026
50
50
 
51
- **Walks** (0.3.0). A timeline made in the full tool can carry `walks`: readings that play one step at a time. **▶ Walk** under the timeline redraws each step's years, fades the other bars, and reads the words aloud with a caption; Space, ← →, Esc. Open in RCN Timeline and Save to wiki carry the walks both ways.
51
+ **Walks** (0.3.0). A timeline made in the full tool can carry `walks`: readings that play one step at a time. **▶ Walk** under the timeline redraws each step's years, fades the other bars, marks the step's bars with an indigo ring and a ▼ pointer (0.3.4; the ring pulses once, unless the reader has asked for reduced motion), and reads the words aloud with a caption; Space, ← →, Esc. Open in RCN Timeline and Save to wiki carry the walks both ways.
52
52
 
53
53
  **Recorded voices** (0.3.1). A step may carry `voices`, people's own recordings of its words, made with ● Record in the timeline's walk editor: `{"<name>": {audio, say}}`. The walk plays a step's recording when it has one and the computer voice otherwise; a chooser in the walk bar picks whose, or the computer voice only (kept in `rcnWalkPrefs.speaker`). On Save to wiki the plugin moves each recording into the site's assets, `assets/voice-files/<content hash>.webm`, uploaded once however often the page is saved, and the step keeps only the file's full address, so pages and their history never hold audio and a forked page still plays from the original site. If the upload fails (not signed in), the recording stays inside the walk until the next save that can upload it.
@@ -308,6 +308,28 @@
308
308
  $item.find('.rcnt-canvas [data-from]').each(function () {
309
309
  this.style.opacity = Math.min(op(this.getAttribute('data-from')), op(this.getAttribute('data-to')))
310
310
  })
311
+ walkMark($item, lit)
312
+ }
313
+
314
+ // A ring round each bar the step is about, pulsing once as the step arrives, and a
315
+ // pointer over it, so the eye finds what is being talked about. Indigo, like the
316
+ // caption box, so the words and the bar read as a pair. Same marker as the tool.
317
+ function walkMark ($item, lit) {
318
+ const svg = $item.find('.rcnt-canvas svg')[0]
319
+ if (!svg) return
320
+ const W = +svg.getAttribute('width'), still = (() => { try { return matchMedia('(prefers-reduced-motion: reduce)').matches } catch (e) { return false } })()
321
+ const mk = (tag, a) => { const n = document.createElementNS(NS, tag); for (const k in a) n.setAttribute(k, a[k]); return n }
322
+ $item.find('.rcnt-canvas g.rcnt-bar').each(function () {
323
+ if (!lit.has(this.getAttribute('data-iv'))) return
324
+ const b = this.getBBox()
325
+ if (b.x + b.width < 0 || b.x > W) return
326
+ const ring = mk('rect', { x: b.x - 3, y: b.y - 3, width: Math.max(8, b.width + 6), height: b.height + 6, rx: 5, fill: 'none', stroke: '#4f46e5', 'stroke-width': 2, 'pointer-events': 'none' })
327
+ if (!still) ring.appendChild(mk('animate', { attributeName: 'stroke-width', values: '5;2', dur: '0.9s', fill: 'freeze' }))
328
+ svg.appendChild(ring)
329
+ const core = this.lastElementChild.getBBox()
330
+ const cx = Math.max(6, Math.min(W - 6, core.x + core.width / 2)), tip = b.y - 4
331
+ svg.appendChild(mk('path', { d: `M${cx - 5},${tip - 7} L${cx + 5},${tip - 7} L${cx},${tip} Z`, fill: '#4f46e5', stroke: '#fff', 'stroke-width': 1, 'stroke-linejoin': 'round', 'pointer-events': 'none' }))
332
+ })
311
333
  }
312
334
 
313
335
  // Voice and speed are the listener's: kept in this browser, the same keys the Graph Tool uses.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-plugin-rcntimeline",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Federated Wiki plugin: a small RCN timeline on a page — intervals with fuzzy edges, the links between them, a date axis; each bar opens its page",
5
5
  "keywords": ["wiki", "federated wiki", "plugin", "rcn", "timeline"],
6
6
  "author": "RCN Network <rcn@relocalizecreativity.net>",