@rr0/ufoathome 0.63.6 → 0.63.8

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
@@ -368,16 +368,25 @@ always a real sighting and always needs the real sky/ground backdrop.
368
368
  <rr0-sighting src="sighting.json"></rr0-sighting>
369
369
  ```
370
370
 
371
- `src` accepts either a single witness's `sighting.json` directly (the common case — no extra file needed) or, for
372
- a case with several witnesses, a small manifest: a plain JSON array of each witness's own `SightingRecordingJson`
373
- URL (typically relative to the case's own page, same as `<rr0-scene>`'s own `src`):
371
+ `src` accepts either a single witness's `sighting.json` directly or a **case**: RR0's own `case.json`, whose
372
+ `events` of `eventType: "sighting"` each point at one witness's `SightingRecordingJson` by `url`, read relative to
373
+ the case file itself (so the same case works from its dossier's page and from anywhere else). A case's other events
374
+ (analyses, articles, films, confessions) are not replayed. See `CaseJson` in `src/engine/persistence/caseJson.ts`:
374
375
 
375
376
  ```json
376
- ["chiles-sighting.json", "whitted-sighting.json"]
377
+ {
378
+ "id": "ChilesWhitted",
379
+ "title": "Chiles et Whitted",
380
+ "events": [
381
+ { "type": "event", "eventType": "sighting", "url": "witness-chiles.json" },
382
+ { "type": "event", "eventType": "sighting", "url": "witness-whitted.json" }
383
+ ]
384
+ }
377
385
  ```
378
386
 
379
- The two shapes are told apart automatically — a fetched JSON array is a manifest, a plain object is one witness's
380
- own recording. No labels or ids are duplicated in a manifest itself — each witness's display name and the shared
387
+ The two shapes are told apart automatically — an object with `events` and no `timeline` is a case, anything else
388
+ one witness's own recording. A bare JSON array (the witness manifest read before cases) is refused with an error
389
+ naming `case.json`. No labels are duplicated in the case — each witness's display name and the shared
381
390
  case id grouping them together are read from that witness's *own* file (`witness`/`caseId`, see
382
391
  [Data format](#data-format)), so there's a single source of truth and nothing to drift out of sync. This means
383
392
  every listed witness's recording is fetched upfront (to read its name), not lazily on selection — fine at the
@@ -396,8 +405,8 @@ cross-check). Each file now carries its own witness's account.
396
405
 
397
406
  | Member | Kind | Description |
398
407
  |---|---|---|
399
- | `src` | attribute | URL of a single `sighting.json` or a witness manifest (above), fetched automatically on connect and whenever the attribute changes |
400
- | `witnessUrls` | property (get/set) | The manifest as a plain array of URLs, for programmatic use instead of `src` |
408
+ | `src` | attribute | URL of a single `sighting.json` or a `case.json` (above), fetched automatically on connect and whenever the attribute changes |
409
+ | `witnessUrls` | property (get/set) | The recordings to show as a plain array of URLs, for programmatic use instead of `src` |
401
410
  | `sightingData` | property (get/set) | One witness's recording, set directly instead of fetched — for a page holding one in memory (text pasted into a form, a file the reader picked). Its entry carries no URL, so the info panel's editor link and embed lines fall back to the bare application, which is the honest answer for something published nowhere |
402
411
  | `scene` | property (readonly) | The `<rr0-scene>` this composes — and through `scene.ufoElement`, the playback members above |
403
412
  | `loadFromSrc(url)` | method (async) | What the `src` attribute triggers internally; can be called directly too |
@@ -407,7 +416,7 @@ button on the right. The witness portion is plain text for a single witness (a o
407
416
  pointless); once there's more than one, it becomes the live `<select>` instead — but the sentence itself, and the
408
417
  info button, stay visible either way. The first witness loads automatically once the list is known; switching the
409
418
  selector loads that witness's already-fetched recording into the nested `<rr0-scene>` (no re-fetch). Setting
410
- `witnessUrls` again (e.g. a manifest refresh) keeps the current selection if that witness is still present, instead
419
+ `witnessUrls` again (e.g. a case re-read) keeps the current selection if that witness is still present, instead
411
420
  of resetting back to the first.
412
421
 
413
422
  Clicking "?" opens a panel anchored under the button (it never shifts the canvas below it). Where the browser has