@wz927/codedesign 0.2.16 → 0.2.17

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.
@@ -248,12 +248,34 @@ async function handle(req) {
248
248
  if ('resize' in n && (typeof patch.width === 'number' || typeof patch.height === 'number')) {
249
249
  n.resize((_d = patch.width) !== null && _d !== void 0 ? _d : n.width, (_e = patch.height) !== null && _e !== void 0 ? _e : n.height);
250
250
  }
251
- for (const k of ['x', 'y', 'cornerRadius', 'opacity', 'rotation', 'visible', 'name', 'itemSpacing',
251
+ for (const k of ['x', 'y', 'opacity', 'rotation', 'visible', 'name', 'itemSpacing',
252
252
  'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'strokeWeight', 'layoutMode',
253
253
  'primaryAxisAlignItems', 'counterAxisAlignItems', 'clipsContent', 'textAlignHorizontal', 'fontSize']) {
254
254
  if (patch[k] !== undefined)
255
255
  n[k] = patch[k];
256
256
  }
257
+ // cornerRadius: number → uniform; [tl,tr,br,bl] → per-corner
258
+ if (patch.cornerRadius !== undefined) {
259
+ const cr = patch.cornerRadius;
260
+ if (typeof cr === 'number') {
261
+ n.cornerRadius = cr;
262
+ }
263
+ else if (Array.isArray(cr) && cr.length === 4) {
264
+ n.topLeftRadius = cr[0];
265
+ n.topRightRadius = cr[1];
266
+ n.bottomRightRadius = cr[2];
267
+ n.bottomLeftRadius = cr[3];
268
+ }
269
+ }
270
+ // Also support explicit per-corner keys
271
+ if (patch.topLeftRadius !== undefined)
272
+ n.topLeftRadius = patch.topLeftRadius;
273
+ if (patch.topRightRadius !== undefined)
274
+ n.topRightRadius = patch.topRightRadius;
275
+ if (patch.bottomRightRadius !== undefined)
276
+ n.bottomRightRadius = patch.bottomRightRadius;
277
+ if (patch.bottomLeftRadius !== undefined)
278
+ n.bottomLeftRadius = patch.bottomLeftRadius;
257
279
  if (patch.fills)
258
280
  n.fills = patch.fills.map(toPaint);
259
281
  if (patch.strokes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wz927/codedesign",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Terminal AI agent for designers — drive Figma through natural-language conversation.",
5
5
  "type": "module",
6
6
  "bin": {