@liquidcars/atlas 0.1.48 → 0.1.49

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
@@ -421,3 +421,53 @@ selección se conserva durante las mutaciones del modelo siempre que el elemento
421
421
  siga existiendo. Se mantienen las correcciones de geometría, toolbar, etiquetas,
422
422
  paleta externa, edición en caliente y los modos `directed`, `bidirectional` y
423
423
  `broken` introducidos en las versiones anteriores.
424
+
425
+ ## Hyperlinked Atlas documents
426
+
427
+ Entities and relations can keep their external `url` and also declare an
428
+ `atlasRef` such as `atlas:actors/dealer.atlas.md#inventory`. A leading slash
429
+ (`atlas:/overview.atlas.md`) starts at the root of the host's document
430
+ collection; otherwise the path resolves beside the current document. The
431
+ optional fragment selects an entity in the destination. Paths cannot escape
432
+ the collection root.
433
+
434
+ The information panel accepts `content: { format: "markdown", value: "…" }`
435
+ or `content: { format: "html", value: "…" }`. It also accepts a `source`
436
+ instead of an inline `value` when a content resolver is configured. HTML is
437
+ restricted to text formatting and safe `atlas:` or HTTP(S) links. Existing
438
+ `text` remains the fallback when `content` is absent.
439
+
440
+ The host supplies documents and optional external content:
441
+
442
+ ```js
443
+ atlas.setDocumentResolver(async ({ uri, from }) => ({
444
+ uri,
445
+ model: await loadAndCompileDocument(uri, from)
446
+ }));
447
+ atlas.setContentResolver(async ({ source, from, format }) =>
448
+ loadContent(source, from, format));
449
+ await atlas.load(initialModel);
450
+ atlas.setDocumentUri("atlas:/overview.atlas.md");
451
+ ```
452
+
453
+ The component exposes `openAtlas(reference)`, `goHome()`, `goBack()`,
454
+ `goForward()`, `goToVisit(index)` and `getDocumentHistory()`.
455
+ Navigation and failures emit `lc-navigation` and `lc-navigation-error`.
456
+ Home, Back and Forward appear in a top navigation bar; holding Back or Forward
457
+ opens a visit list. Hosts with their own top bar can set
458
+ `navigation-controls="external"` and connect those controls to the public
459
+ history methods, as Atlas Studio does. Selecting a linked entity or relation shows a floating link button
460
+ beside it. The information panel remains focused on descriptive content and
461
+ external documentation. Studio's Markdown and visual views can open a local
462
+ folder; they treat that folder as the root of `atlas:/`.
463
+ Where supported, Studio requests read and write directory access. It discovers
464
+ document names, reads files only as they are opened or referenced, and caches
465
+ their text in the current tab. Save writes the active Markdown document back
466
+ to its original file, including edits from the visual editor; switching editors
467
+ preserves the document and visit history. Nothing is sent to a server. Browsers
468
+ without the directory picker use a file-input fallback, whose native dialog may
469
+ call the selection “Upload”; Studio still reads the files locally on demand.
470
+ In that fallback, Save opens a picker or downloads a copy because the selected
471
+ files cannot be written in place.
472
+ See `examples/hyperlinks` for two linked documents and an external Markdown
473
+ information file.