easel-canvas 0.1.0 → 0.1.1

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
@@ -137,7 +137,7 @@ npm run design # http://localhost:4317
137
137
  | Find | Left "Boards" tab: ⌘K search and list; pages (drag to reorder; right-click to rename, delete, or set the launch page) |
138
138
  | Boards | Draw with the board tool (B), use a "New board" template (Blank · Mobile screen · Desktop screen · Document), or drop an HTML file on the canvas. Duplicate ⌘D, rename F2 (renaming the file offers to update references), Delete (confirm, trash, undo), Bring to front / Send to back ⌘] ⌘[ |
139
139
  | Multiple items | Drag on empty space to marquee-select or use Shift; move together (snap guides, Alt to disable); arrow keys 1, Shift 10, Option 100 |
140
- | Board options | Right "Properties": position, size, Radius, Frameless, Interactive (Play), Fill window (page-style), Open as launch screen, Layout guides (Columns · Rows · Grid, up to 6, ⌃G), Tweaks |
140
+ | Board options | Right "Properties": position, size, Radius, No frame, Interactive (Play), Stretch to window, Open as launch screen, Layout guides (Columns · Rows · Grid, up to 6, ⌃G), Adjustable values |
141
141
  | View | Focus view (F, ←→), Play in place (P or ▶, Esc), Play full screen (right-click) |
142
142
  | Notes and shapes | Title (T), sticky note (N, 8 colors, size, bold, italic), Rectangle (R), Oval (O), Line (L), Arrow (A), Pen (P when no board is selected), image (Assets or paste) |
143
143
  | Edit mode | Double-click or E. Click or Shift, Esc for parent, Enter for child, ↑↓ for siblings, Option+↑↓ to reorder, ⌘A for all siblings, ⌘G Wrap in flex |
@@ -183,7 +183,7 @@ npm run demo # run the repo's demo from source
183
183
  | `app/` | Canvas UI (Vite + React + TypeScript); all UI text lives in `app/src/strings.ts` |
184
184
  | `test/` | `node --test` unit tests and Playwright e2e tests |
185
185
 
186
- Easel was called **design-canvas** until October 2026 (old links redirect here). It started as `tools/design-canvas` inside a [team project](https://github.com/snuhcs-course/swpp-2026-project-team-06) and moved here with its history. The original plan is in [PLAN.md](PLAN.md), a feature-by-feature comparison with Claude Design is in [PARITY.md](PARITY.md), and the work log is in [tasks.md](tasks.md).
186
+ Background reading: the original plan is in [PLAN.md](PLAN.md), a feature-by-feature comparison with Claude Design is in [PARITY.md](PARITY.md), and the work log is in [tasks.md](tasks.md).
187
187
 
188
188
  Contributions are welcome: open an issue or a pull request.
189
189
 
package/bin/mcp.mjs CHANGED
@@ -217,14 +217,19 @@ server.registerTool(
217
217
 
218
218
  server.registerTool(
219
219
  "get_tokens",
220
- { description: "Get the design tokens (colors per theme, font sizes, weights, radii, spacing, fonts, minimum tap target). Use only these values when creating or editing screens.", inputSchema: {} },
221
- async () => ok(await callJson("GET", "/api/tokens")),
220
+ {
221
+ description:
222
+ "Get the design tokens (colors per theme, font sizes, weights, radii, spacing, fonts, minimum tap target) from tokens.json. Use only these values when creating or editing screens. If the project has no tokens.json it returns registered: false and no values; then keep to the styles already in the file.",
223
+ inputSchema: {},
224
+ },
225
+ async () => ok(await callJson("GET", "/api/tokens?agent=1")),
222
226
  );
223
227
 
224
228
  server.registerTool(
225
229
  "check_tokens",
226
230
  {
227
- description: "Find off-token values in screen HTML (colors, font sizes, weights, radii, spacing not a multiple of 4). Use it to verify your edits. Omit file to check all screens.",
231
+ description:
232
+ "Find off-token values in screen HTML (colors, font sizes, weights, radii, spacing not a multiple of 4). Use it to verify your edits. Omit file to check all screens. If the project has no tokens.json it returns registered: false and no violations (nothing to check against).",
228
233
  inputSchema: { file: z.string().optional() },
229
234
  },
230
235
  async ({ file }) => ok(await callJson("GET", `/api/lint${file ? `?f=${encodeURIComponent(file)}` : ""}`)),
package/bin/server.mjs CHANGED
@@ -47,8 +47,9 @@ if (args.demo) {
47
47
  } else if (args.init) {
48
48
  if (!existsSync(path.join(dir, "screens"))) {
49
49
  const { newBoardHtml } = await import("../server/boards.mjs");
50
+ const { projectName } = await import("../server/fsutil.mjs");
50
51
  mkdirSync(path.join(dir, "screens"), { recursive: true });
51
- writeFileSync(path.join(dir, "screens/home.html"), newBoardHtml({ title: "Home", w: 390, h: 844, template: "mobile" }));
52
+ writeFileSync(path.join(dir, "screens/home.html"), newBoardHtml({ title: "Home", w: 390, h: 844, template: "mobile", brand: projectName(dir) }));
52
53
  console.log(`Created ${path.join(dir, "screens/home.html")}`);
53
54
  }
54
55
  open = true;