lecodes-cli 0.13.1 → 0.13.2
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/dist/index.js +26 -19
- package/package.json +3 -3
- package/runtime/sdk-types.json +1 -1
- package/runtime/sdk/compile/aspectMacro.ts +0 -42
- package/runtime/sdk/compile/assetIconMacro.ts +0 -382
- package/runtime/sdk/compile/assetMacro.ts +0 -45
- package/runtime/sdk/compile/assetName.ts +0 -50
- package/runtime/sdk/compile/bundler.ts +0 -244
- package/runtime/sdk/compile/compileProject.ts +0 -106
- package/runtime/sdk/compile/detectEntry.ts +0 -125
- package/runtime/sdk/compile/fontMacro.ts +0 -459
- package/runtime/sdk/compile/fontRegistry.ts +0 -78
- package/runtime/sdk/compile/header.ts +0 -55
- package/runtime/sdk/compile/index.ts +0 -53
- package/runtime/sdk/compile/libraryImports.ts +0 -52
- package/runtime/sdk/compile/sceneEditor.ts +0 -78
- package/runtime/sdk/compile/sfnt.ts +0 -98
- package/runtime/sdk/compile/sourcemap.ts +0 -25
package/dist/index.js
CHANGED
|
@@ -43217,13 +43217,13 @@ This is an intent-capture stage — screens run on inline mock data, before any
|
|
|
43217
43217
|
## Read this first, then meta.json
|
|
43218
43218
|
|
|
43219
43219
|
\`meta.json\` is the app map: every screen (position, description) and the edges between them
|
|
43220
|
-
(navigation intent). **Read it before opening any screen file.**
|
|
43221
|
-
|
|
43222
|
-
|
|
43223
|
-
|
|
43224
|
-
\`lecodes design arrange
|
|
43225
|
-
|
|
43226
|
-
positions
|
|
43220
|
+
(navigation intent). **Read it before opening any screen file.** When you create a screen, add its
|
|
43221
|
+
meta entry **without a \`pos\`** and add edges — the board places it from its structure (its tab
|
|
43222
|
+
lane, its group region, its flow neighbours) and **persists that position itself**; you never
|
|
43223
|
+
hand-pick coordinates (you can't see the board). To tidy after a batch of changes, call the
|
|
43224
|
+
\`arrange_screens\` MCP tool (or \`lecodes design arrange\`) — the layout engine knows tab rails,
|
|
43225
|
+
group regions and flow direction. Never reposition or rewrite existing \`pos\` values or
|
|
43226
|
+
human-authored descriptions — positions the developer dragged are theirs.
|
|
43227
43227
|
|
|
43228
43228
|
\`\`\`json
|
|
43229
43229
|
{
|
|
@@ -43247,11 +43247,15 @@ positions or descriptions.
|
|
|
43247
43247
|
- **An edge from a screen to itself** (\`"from": "home", "to": "home@empty"\`) is a *state link*: the
|
|
43248
43248
|
board draws it as a chip on the activator element (clicking it switches the tile's state), never
|
|
43249
43249
|
as an arrow. Use it to record "tapping X puts this screen into state Y".
|
|
43250
|
-
- **Group
|
|
43251
|
-
|
|
43252
|
-
|
|
43253
|
-
|
|
43254
|
-
|
|
43250
|
+
- **Group only what the tab bar doesn't already section.** Screens on a tab bar are sectioned by
|
|
43251
|
+
their lanes — never set a \`group\` on a tab root or any screen that mounts the bar (a group that
|
|
43252
|
+
duplicates a lane draws nothing and gets flagged for deletion). Group the screens *outside* the
|
|
43253
|
+
bar by user-facing area — \`"group": "Onboarding"\` — 2–6 screens per group (Onboarding,
|
|
43254
|
+
Recovery, Pickers…; on an app with no tab bar that means every screen). Groups render as labeled
|
|
43255
|
+
regions and \`arrange\` lays each out as its own sub-flow, so grouping keeps big boards legible.
|
|
43256
|
+
Semantic clustering is your job (you're good at it); coordinates are \`arrange\`'s (it can see
|
|
43257
|
+
the board, you can't). Don't regroup existing screens unless asked — groups are part of the
|
|
43258
|
+
human's map.
|
|
43255
43259
|
- **Tag a screen's \`role\`** in its meta entry — its *kind* (\`list\`, \`detail\`, \`form\`, \`auth\`,
|
|
43256
43260
|
\`modal\`…). Optional, renders on the board, captures concept the screen source can't;
|
|
43257
43261
|
\`lecodes design check\` lists screens still untagged (never blocking). *(A screen's **states** are
|
|
@@ -43332,6 +43336,8 @@ Most apps have one — declare it ONCE, in source, and never draw edges for it:
|
|
|
43332
43336
|
- The canvas discovers all of this from the source (like screen states) and draws the bar as a
|
|
43333
43337
|
**rail + lane bands** — tab switching needs NO edges, and \`design_state\` serves the discovered
|
|
43334
43338
|
\`hubs\`. In the live prototype, tapping a tab button jumps the board to that tab's root screen.
|
|
43339
|
+
- The lane bands replace groups for bar screens: don't \`group\` anything that mounts the bar
|
|
43340
|
+
(see the meta.json section) — groups are for the flows *outside* the bar.
|
|
43335
43341
|
- Style through theme variables: the bar reads \`var(--primaryColor)\`, \`var(--mutedColor)\`,
|
|
43336
43342
|
\`var(--tabbarBg)\`, \`var(--screenBg)\` (with fallbacks) — one \`theme({ primaryColor: … })\` call
|
|
43337
43343
|
restyles it app-wide. You may restyle \`shared/tabs.ts\` itself; keep the \`defineTabs({ … })\`
|
|
@@ -43497,8 +43503,8 @@ JSON by hand (a message missing its \`pending\` flag is never delivered, and not
|
|
|
43497
43503
|
1. \`board_activity\` (if the server is up), then \`design_comments\` for anything open, then read
|
|
43498
43504
|
\`meta.json\`, the \`shared/\` signatures, and only the screens you need.
|
|
43499
43505
|
2. Create/edit screen files; register new screens in \`meta.json\` **without \`pos\`** and add edges —
|
|
43500
|
-
|
|
43501
|
-
|
|
43506
|
+
the board places them from their lane/group/flow structure and persists the result. After a
|
|
43507
|
+
larger batch, \`arrange_screens\` (MCP) or \`lecodes design arrange\` re-tidies the whole board.
|
|
43502
43508
|
3. \`check_screens\` → \`render_screen\` (or \`lecodes design snapshot\`) → verify → fix.
|
|
43503
43509
|
4. When the developer edits a description, text, or the flow on the canvas — visible in
|
|
43504
43510
|
\`board_activity\` and in \`meta.json\`/the screen source — treat it as the updated spec.
|
|
@@ -43849,11 +43855,12 @@ var DEFAULT_DIR = "design", DEFAULT_PORT = 4477, getContext = (args) => {
|
|
|
43849
43855
|
const designServer = await loadDesignServer(ctx);
|
|
43850
43856
|
const onlyNew = flagBool(args, "new");
|
|
43851
43857
|
const summary = designServer.arrangeDesign(ctx.designDir, { onlyNew });
|
|
43858
|
+
const score = summary.score ? ` (score ${summary.score.before.toFixed(0)} → ${summary.score.after.toFixed(0)}, lower is better)` : "";
|
|
43852
43859
|
if (!summary.changed) {
|
|
43853
|
-
log(onlyNew ? "No unplaced screens — nothing to arrange." :
|
|
43860
|
+
log(onlyNew ? "No unplaced screens — nothing to arrange." : `Already in its arranged shape — nothing moved${score}.`);
|
|
43854
43861
|
return;
|
|
43855
43862
|
}
|
|
43856
|
-
log(`${c.green("✓")} ${onlyNew ? "Placed" : "Arranged"} ${summary.moved} screen${summary.moved === 1 ? "" : "s"} in ${ctx.dirName}/meta.json.`);
|
|
43863
|
+
log(`${c.green("✓")} ${onlyNew ? "Placed" : "Arranged"} ${summary.moved} screen${summary.moved === 1 ? "" : "s"} in ${ctx.dirName}/meta.json${score}.`);
|
|
43857
43864
|
}, share = async (ctx, args) => {
|
|
43858
43865
|
if (!ctx.manifest) {
|
|
43859
43866
|
throw new CliError("`lecodes design share` needs a cloned project. Run it inside one, and push the design first (lecodes push).");
|
|
@@ -45213,7 +45220,7 @@ var require_main = __commonJS((exports, module) => {
|
|
|
45213
45220
|
// package.json
|
|
45214
45221
|
var package_default = {
|
|
45215
45222
|
name: "lecodes-cli",
|
|
45216
|
-
version: "0.13.
|
|
45223
|
+
version: "0.13.2",
|
|
45217
45224
|
dependencies: {
|
|
45218
45225
|
"@letary/chisel": "^0.6.0",
|
|
45219
45226
|
jimp: "^1.6.1"
|
|
@@ -45226,8 +45233,8 @@ var package_default = {
|
|
|
45226
45233
|
sdk: "workspace:*"
|
|
45227
45234
|
},
|
|
45228
45235
|
peerDependencies: {
|
|
45229
|
-
"lecodes-design": "^0.
|
|
45230
|
-
"lecodes-renderer": "^0.8.
|
|
45236
|
+
"lecodes-design": "^0.6.0",
|
|
45237
|
+
"lecodes-renderer": "^0.8.1",
|
|
45231
45238
|
"lecodes-3d-editor": "^0.2.0"
|
|
45232
45239
|
},
|
|
45233
45240
|
bin: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lecodes-cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@letary/chisel": "^0.6.0",
|
|
6
6
|
"jimp": "^1.6.1"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"sdk": "workspace:*"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"lecodes-design": "^0.
|
|
17
|
-
"lecodes-renderer": "^0.8.
|
|
16
|
+
"lecodes-design": "^0.6.0",
|
|
17
|
+
"lecodes-renderer": "^0.8.1",
|
|
18
18
|
"lecodes-3d-editor": "^0.2.0"
|
|
19
19
|
},
|
|
20
20
|
"bin": {
|