@liquidcars/atlas-layout 0.1.13 → 0.1.14
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 +4 -0
- package/package.json +1 -1
- package/src/index.js +5 -0
package/README.md
CHANGED
|
@@ -118,6 +118,10 @@ const resolved = compileAtlasYaml(yamlText);
|
|
|
118
118
|
|
|
119
119
|
La API principal recibe un objeto JavaScript ya parseado. Se aceptan entidades anidadas mediante `children` o entidades planas con referencias `parent`; internamente ambas formas se normalizan al contrato plano. Las entradas de texto se manejan mediante los subpaths `/yaml` y `/build` durante el build.
|
|
120
120
|
|
|
121
|
+
El entrypoint principal exporta `ATLAS_LAYOUT_VERSION`, obtenido del manifest
|
|
122
|
+
del paquete cargado. Las aplicaciones anfitrionas pueden compararlo con la
|
|
123
|
+
versión declarada en sus propias dependencias.
|
|
124
|
+
|
|
121
125
|
En Markdown se acepta front matter YAML, un bloque completo ` ```atlas ` o bloques separados ` ```atlas-model `, ` ```atlas-layout `, ` ```atlas-render ` y ` ```atlas-relations `. Por ejemplo:
|
|
122
126
|
|
|
123
127
|
````markdown
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ATLAS_LAYOUT_SPEC_V1 } from "./spec.js";
|
|
2
|
+
import atlasLayoutPackage from "../package.json" with { type: "json" };
|
|
3
|
+
|
|
4
|
+
// Consumers can compare this value with their declared dependency to verify
|
|
5
|
+
// the exact layout module that is executing.
|
|
6
|
+
export const ATLAS_LAYOUT_VERSION = atlasLayoutPackage.version;
|
|
2
7
|
|
|
3
8
|
const DEFAULT_COLOR = "#b9d8eb";
|
|
4
9
|
|