@elyx-design/cli 0.0.1-preview.15667.gc9ae1908b → 0.0.1-preview.16156.g8557f06bc

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.
Files changed (2) hide show
  1. package/README.md +42 -31
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -32,20 +32,20 @@ Alpine and other musl-based distributions are not currently supported.
32
32
  `cli.ts` is the npm launcher. `src/` contains the native entry point, commands,
33
33
  and their tests and fixtures. `CMakeLists.txt` builds the native `elyx` executable
34
34
  using Mosaic's shared language and rendering code. `cmake/` contains embedded
35
- resource generators. `cpp-vendors.yml` declares CLI11, libgit2, and the demo
36
- project used by `--create`.
35
+ resource generators. The root `cpp-vendors.yml` declares its dependencies,
36
+ including CLI11, libgit2, and the demo project used by `--create`.
37
37
 
38
38
  Run from the repository root:
39
39
 
40
40
  ```sh
41
- mise run vendors:elyx
41
+ mise run vendors:cpp
42
42
  mise run elyx:build
43
43
  mise run elyx:test:cpp
44
44
  mise run cli:build
45
45
  ```
46
46
 
47
- The native debug executable is written to `out/native/debug/elyx` within this
48
- directory. The npm launcher builds to `dist/cli.js`. The published npm package
47
+ The native debug executable is written to `out/native/debug/elyx` at the
48
+ repository root. The npm launcher builds to `dist/cli.js`. The published npm package
49
49
  includes only the launcher, README, and license; platform packages supply the
50
50
  native executable.
51
51
 
@@ -53,9 +53,8 @@ The daemon also compiles rendering, inspection, lint, and scene code from
53
53
  `src/`. Mosaic uses its native font-loading code.
54
54
 
55
55
  The Figma reader and its CLI adapter live in `src/fig/`. Its miniz
56
- and Zstandard dependencies are also listed in `cpp-vendors.yml` and are only
57
- configured by the native CLI build. The daemon also builds the reader and
58
- converter using its own pinned dependencies for sidebar `.fig` imports.
56
+ and Zstandard dependencies are also listed in the root `cpp-vendors.yml`. The
57
+ daemon links the same reader and converter for sidebar `.fig` imports.
59
58
  Both native targets use libcurl for Google Fonts downloads (on Linux, install
60
59
  `libcurl4-openssl-dev` to build; macOS provides libcurl in its SDK).
61
60
  Windows builds the vendored curl with Schannel. Linux AppImages bundle the
@@ -165,36 +164,48 @@ files.
165
164
  ## Layer targets
166
165
 
167
166
  `elyx render` follows the input file's `__file__ {draw-connections: .true}`
168
- setting when drawing connection arrows. When rendering a layer with `--symbol`,
167
+ setting when drawing connection arrows. When rendering a layer with `--ref`,
169
168
  only connections contained within that layer appear. Pass `--no-connections`
170
169
  to omit arrows from the PNG without changing the file.
171
170
 
172
- Inspection returns a `target` on component nodes and bounds, hit, and rectangle
173
- results. It contains `filePath`, `sourceRef`, and `overridePath`; a null target
174
- means the runtime layer has no reusable source address. Other fields such as
175
- `symbol`, `ref`, and `path` describe the layer, rather than identifying an exact
176
- instance occurrence.
171
+ `elyx find` locates layers by exact reference (`--ref`), the topmost layer at a
172
+ board-space point (`--at X,Y`), or the layers within a rectangle
173
+ (`--in X,Y,W,H`), and returns their geometry in a `results` array. `elyx tree`
174
+ returns the resolved layer tree of one layer (`--ref`) or, without one, of the
175
+ file's board. Both echo their inputs: `find` under `query`, and `tree` as `ref`
176
+ and `depth` (`"shallow"`, `"full"`, or an instance budget).
177
177
 
178
- Component nodes also carry the layer's `doc` note and its `meta` map, or null
179
- when absent. `meta` values keep their Elyx kind (string, number, or boolean),
180
- and instances report the `meta` they inherit from their source.
178
+ Each find result and tree node carries a `target` containing `filePath`,
179
+ `sourceRef`, and `overridePath`; a null target means the runtime layer has no
180
+ reusable source address. Other fields such as `symbol`, `ref`, and `path`
181
+ describe the layer, rather than identifying an exact instance occurrence.
181
182
 
182
- Every inspect result names its `command` and echoes its inputs under `query`.
183
- For `component`, that is the `selector` and the requested `depth` (`"shallow"`,
184
- `"full"`, or an instance budget).
183
+ Tree nodes also carry the layer's `doc` note and its `meta` map, or null when
184
+ absent. `meta` values keep their Elyx kind (string, number, or boolean), and
185
+ instances report the `meta` they inherit from their source.
185
186
 
186
- Use the target's file path as the CLI input, `sourceRef` as inspect's `--ref` or
187
- render's `--symbol`, and `overridePath` as `--override-path`. For example:
187
+ A value bound to a design token is written as `{"value": …, "token":
188
+ "<file>#<group>.<member>"}` instead of the plain value. The token names the
189
+ context-free declaration, so it stays the same under every `--context`, while
190
+ `value` is resolved under the selection the tree reports as `contexts`. Sizes
191
+ and constraints are `"auto"` for hugging content, numbers for fixed values,
192
+ `"N%"` for relative values, and null when unset.
193
+
194
+ Use the target's file path as the CLI input, `sourceRef` as `--ref`, and
195
+ `overridePath` as `--override-path`. For example:
188
196
 
189
197
  ```sh
190
- elyx inspect component screen.elyx --ref=musicPlayer.track.save
191
- elyx inspect bounds screen.elyx --ref=card --override-path="'ui.Body.Label"
192
- elyx render screen.elyx --symbol=card --override-path="'ui.Body.Label" -o label.png
198
+ elyx tree screen.elyx --ref=musicPlayer.track.save
199
+ elyx find screen.elyx --ref=card
200
+ elyx render screen.elyx --ref=card -o card.png
193
201
  ```
194
202
 
195
- Copy override paths from inspection; their namespace qualifiers distinguish
196
- imported descendants. Ambiguous source references fail instead of choosing an
197
- instance. In MCP, pass the returned object as `query.target` to inspect
198
- bounds/component, `target` to render, or an entry in focus's `targets` array.
199
- Spatial inspect queries use `query.filePath`. To render a whole document, pass
200
- `target: {filePath: "screen.elyx"}`.
203
+ For descendants, copy `sourceRef` and `overridePath` from a target returned by
204
+ find or tree without interpreting them. Ambiguous source references fail instead
205
+ of choosing an instance. In MCP, pass the returned object as `select.target` to `elyx_find`,
206
+ `root.target` to `elyx_tree`, `target` to render, or an entry in focus's
207
+ `targets` array. Point and rectangle finds and whole-file trees use `filePath`.
208
+ To render a whole document, pass `target: {filePath: "screen.elyx"}`.
209
+
210
+ `elyx inspect bounds|hit|rect|component` are deprecated aliases for
211
+ `find` and `tree`. They print a notice on stderr and emit the new output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-design/cli",
3
- "version": "0.0.1-preview.15667.gc9ae1908b",
3
+ "version": "0.0.1-preview.16156.g8557f06bc",
4
4
  "description": "Command-line tools for Elyx",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "optionalDependencies": {
25
- "@elyx-design/cli-darwin-arm64": "0.0.1-preview.15667.gc9ae1908b",
26
- "@elyx-design/cli-linux-x64": "0.0.1-preview.15667.gc9ae1908b"
25
+ "@elyx-design/cli-darwin-arm64": "0.0.1-preview.16156.g8557f06bc",
26
+ "@elyx-design/cli-linux-x64": "0.0.1-preview.16156.g8557f06bc"
27
27
  }
28
28
  }