draply-dev 1.3.7 → 1.3.8

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/bin/cli.js +6 -6
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -282,7 +282,7 @@ const server = http.createServer((req, res) => {
282
282
  changesBlock += `\nElement .${item.className}:\n${propsStr}\n`;
283
283
  });
284
284
 
285
- const prompt = `You are a strict code editor. I need to apply CSS style changes to a file.
285
+ const prompt = `You are a strict code editor applying style changes to a file.
286
286
 
287
287
  FILE: ${found.relativePath} (lines ${contextStart + 1}-${contextEnd + 1})
288
288
  \`\`\`
@@ -295,17 +295,17 @@ IMPORTANT: Return ONLY a JSON array of search-and-replace pairs. Each pair forma
295
295
  {"search": "exact code to find", "replace": "modified code to replace it with"}
296
296
 
297
297
  Rules:
298
- - "search" must be an EXACT substring from the file above (copy it precisely).
298
+ - "search" must be an EXACT substring from the file snippet above (copy it precisely).
299
299
  - Ensure all double quotes inside JSON string values are properly escaped (\\").
300
300
  - Do NOT include markdown fences, preambles, or explanations. Only the JSON array.
301
- - For CSS: modify the class rule.
302
- - For JSX with className: add/update the style prop on the element. Do not remove existing classes.
301
+ - If adding properties to an existing CSS rule or JS object (like a style object), you MUST REPLACE the old values for those properties if they already exist. DO NOT CREATE DUPLICATE KEYS.
302
+ - If the file is JSX, update the style object/prop. Do not duplicate properties inside object literals.
303
303
 
304
304
  Example response:
305
305
  [
306
306
  {
307
- "search": "<section className=\\"hero\\">",
308
- "replace": "<section className=\\"hero\\" style={{ color: '#ff0000' }}>"
307
+ "search": "style={{ color: 'blue', opacity: 0.5 }}",
308
+ "replace": "style={{ color: '#ff0000', opacity: 0.5 }}"
309
309
  }
310
310
  ]`;
311
311
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "draply-dev",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "Visual overlay for any frontend project — move, resize, restyle live in the browser, save to CSS",
5
5
  "author": "Arman",
6
6
  "type": "commonjs",