@liquidcars/atlas 0.1.48 → 0.1.50
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 +51 -0
- package/dist/liquidcars-atlas.js +2400 -787
- package/dist/liquidcars-atlas.js.map +1 -1
- package/package.json +1 -1
- package/src/diagram-svg.js +603 -0
- package/src/diagram-view.js +529 -0
- package/src/document-navigation.js +27 -0
- package/src/liquidcars-atlas.js +592 -120
- package/src/panel-content.js +84 -0
package/README.md
CHANGED
|
@@ -191,6 +191,7 @@ generar el archivo.
|
|
|
191
191
|
- `palette`: mapa de nombres de color a valores CSS/hex.
|
|
192
192
|
- `theme` (opcional): configuración de `background`, `lighting`, `panel`, `toolbar`, `breadcrumbs`, `hint` y `ui`. `ui` permite mostrar u ocultar `panel`, `toolbar`, `breadcrumbs` y `hint`.
|
|
193
193
|
- `render.camera` (opcional): vista inicial con `position`, `target` y `zoom`. Las coordenadas pertenecen al espacio del modelo; `zoom` conserva el encuadre relativo entre tamaños de visor.
|
|
194
|
+
- `render.initialMode`: `2d` o `3d`. `render.views."2d".theme` admite `auto` (hereda el fondo del documento), `light` o `dark`; `render.views."2d".grid` activa o desactiva los puntos (por defecto, `true`). `render.views."2d".background` permite un color CSS concreto. `render.ui.toolbar` acepta `true`, `false` o una lista como `[mode, zoom, fit]` para mostrar solo esos controles.
|
|
194
195
|
- `render.focus` (opcional): filtrado visual por selección. `mode` acepta `all` o `connected`, `effect` acepta `dim` o `hide`, y `layout` distingue posiciones estables (`preserve`) de una proyección recompilada (`reflow`).
|
|
195
196
|
- `render.relationMarker` (opcional): forma de los indicadores animados de relación. Admite `cone` (por defecto, conserva el sentido en capturas estáticas) o `ring`.
|
|
196
197
|
- `style.label.anchor` (opcional): posición predeterminada de las etiquetas de los elementos (`auto`, `top`, `bottom`, `left` o `right`). Si se omite, los elementos usan `bottom`; una entidad puede sobrescribirlo con su propio `style.label.anchor`. Los títulos de contenedores mantienen su colocación automática salvo override explícito.
|
|
@@ -421,3 +422,53 @@ selección se conserva durante las mutaciones del modelo siempre que el elemento
|
|
|
421
422
|
siga existiendo. Se mantienen las correcciones de geometría, toolbar, etiquetas,
|
|
422
423
|
paleta externa, edición en caliente y los modos `directed`, `bidirectional` y
|
|
423
424
|
`broken` introducidos en las versiones anteriores.
|
|
425
|
+
|
|
426
|
+
## Hyperlinked Atlas documents
|
|
427
|
+
|
|
428
|
+
Entities and relations can keep their external `url` and also declare an
|
|
429
|
+
`atlasRef` such as `atlas:actors/dealer.atlas.md#inventory`. A leading slash
|
|
430
|
+
(`atlas:/overview.atlas.md`) starts at the root of the host's document
|
|
431
|
+
collection; otherwise the path resolves beside the current document. The
|
|
432
|
+
optional fragment selects an entity in the destination. Paths cannot escape
|
|
433
|
+
the collection root.
|
|
434
|
+
|
|
435
|
+
The information panel accepts `content: { format: "markdown", value: "…" }`
|
|
436
|
+
or `content: { format: "html", value: "…" }`. It also accepts a `source`
|
|
437
|
+
instead of an inline `value` when a content resolver is configured. HTML is
|
|
438
|
+
restricted to text formatting and safe `atlas:` or HTTP(S) links. Existing
|
|
439
|
+
`text` remains the fallback when `content` is absent.
|
|
440
|
+
|
|
441
|
+
The host supplies documents and optional external content:
|
|
442
|
+
|
|
443
|
+
```js
|
|
444
|
+
atlas.setDocumentResolver(async ({ uri, from }) => ({
|
|
445
|
+
uri,
|
|
446
|
+
model: await loadAndCompileDocument(uri, from)
|
|
447
|
+
}));
|
|
448
|
+
atlas.setContentResolver(async ({ source, from, format }) =>
|
|
449
|
+
loadContent(source, from, format));
|
|
450
|
+
await atlas.load(initialModel);
|
|
451
|
+
atlas.setDocumentUri("atlas:/overview.atlas.md");
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
The component exposes `openAtlas(reference)`, `goHome()`, `goBack()`,
|
|
455
|
+
`goForward()`, `goToVisit(index)` and `getDocumentHistory()`.
|
|
456
|
+
Navigation and failures emit `lc-navigation` and `lc-navigation-error`.
|
|
457
|
+
Home, Back and Forward appear in a top navigation bar; holding Back or Forward
|
|
458
|
+
opens a visit list. Hosts with their own top bar can set
|
|
459
|
+
`navigation-controls="external"` and connect those controls to the public
|
|
460
|
+
history methods, as Atlas Studio does. Selecting a linked entity or relation shows a floating link button
|
|
461
|
+
beside it. The information panel remains focused on descriptive content and
|
|
462
|
+
external documentation. Studio's Markdown and visual views can open a local
|
|
463
|
+
folder; they treat that folder as the root of `atlas:/`.
|
|
464
|
+
Where supported, Studio requests read and write directory access. It discovers
|
|
465
|
+
document names, reads files only as they are opened or referenced, and caches
|
|
466
|
+
their text in the current tab. Save writes the active Markdown document back
|
|
467
|
+
to its original file, including edits from the visual editor; switching editors
|
|
468
|
+
preserves the document and visit history. Nothing is sent to a server. Browsers
|
|
469
|
+
without the directory picker use a file-input fallback, whose native dialog may
|
|
470
|
+
call the selection “Upload”; Studio still reads the files locally on demand.
|
|
471
|
+
In that fallback, Save opens a picker or downloads a copy because the selected
|
|
472
|
+
files cannot be written in place.
|
|
473
|
+
See `examples/hyperlinks` for two linked documents and an external Markdown
|
|
474
|
+
information file.
|