dembrandt 0.2.0 → 0.3.0

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
@@ -26,6 +26,7 @@ Dembrandt analyzes live websites and extracts their complete design system:
26
26
  - **Typography** — Font families, sizes, weights, line heights, font sources (Google Fonts, Adobe Fonts, custom)
27
27
  - **Spacing** — Margin and padding scales with grid system detection (4px/8px/custom)
28
28
  - **Border Radius** — Corner radius patterns with usage frequency
29
+ - **Borders** — Border widths, styles (solid, dashed, dotted), and colors with confidence scoring
29
30
  - **Shadows** — Box shadow values for elevation systems
30
31
  - **Buttons** — Component styles with variants and states
31
32
  - **Inputs** — Form field styles (input, textarea, select)
@@ -174,6 +175,14 @@ dembrandt stripe.com --mobile
174
175
 
175
176
  Simulates a mobile device viewport for responsive design token extraction.
176
177
 
178
+ **`--slow`** - Use 3x longer timeouts for slow-loading sites
179
+
180
+ ```bash
181
+ dembrandt linkedin.com --slow
182
+ ```
183
+
184
+ Helpful for sites with heavy JavaScript, complex SPAs, or aggressive bot detection that need extra time to fully load.
185
+
177
186
  ## Output
178
187
 
179
188
  ### Automatic JSON Saves
@@ -272,6 +281,9 @@ dembrandt mysite.com --json-only | jq '{
272
281
  fontFamily: .typography.sources,
273
282
  spacing: .spacing.commonValues
274
283
  }' > design-tokens.json
284
+
285
+ # Or use the built-in Tailwind CSS exporter (see lib/exporters.js)
286
+ # Converts extracted tokens to Tailwind config format
275
287
  ```
276
288
 
277
289
  ## Use Cases
@@ -361,11 +373,12 @@ Use `--debug` to see:
361
373
 
362
374
  ```
363
375
  dembrandt/
364
- ├── index.js # CLI entry point, command handling
376
+ ├── index.js # CLI entry point, command handling
365
377
  ├── lib/
366
- │ ├── extractors.js # Core extraction logic with stealth mode
367
- └── display.js # Terminal output formatting
368
- ├── output/ # Auto-saved JSON extractions (gitignored)
378
+ │ ├── extractors.js # Core extraction logic with stealth mode
379
+ ├── display.js # Terminal output formatting
380
+ │ └── exporters.js # Export to Tailwind CSS config (NEW)
381
+ ├── output/ # Auto-saved JSON extractions (gitignored)
369
382
  │ ├── stripe.com/
370
383
  │ │ ├── 2025-11-22T14-30-45.json
371
384
  │ │ └── 2025-11-22T15-12-33.json
@@ -400,6 +413,7 @@ MIT
400
413
  - [x] Dark mode extraction (via `--dark-mode` flag)
401
414
  - [x] Mobile viewport support (via `--mobile` flag)
402
415
  - [x] Clickable terminal links for modern terminals
416
+ - [?] Figma integration branch: `figma-integration`
403
417
  - [ ] Animation/transition detection
404
418
  - [ ] Interactive state capture (hover, focus, active)
405
419
  - [ ] Multi-page analysis
package/index.js CHANGED
@@ -26,6 +26,7 @@ program
26
26
  .option("--verbose-colors", "Show medium and low confidence colors")
27
27
  .option("--dark-mode", "Extract colors from dark mode")
28
28
  .option("--mobile", "Extract from mobile viewport")
29
+ .option("--slow", "3x longer timeouts for slow-loading sites")
29
30
  .action(async (input, opts) => {
30
31
  let url = input;
31
32
  if (!url.match(/^https?:\/\//)) url = "https://" + url;
@@ -64,6 +65,7 @@ program
64
65
  navigationTimeout: 90000,
65
66
  darkMode: opts.darkMode,
66
67
  mobile: opts.mobile,
68
+ slow: opts.slow,
67
69
  });
68
70
  break;
69
71
  } catch (err) {
@@ -89,7 +91,7 @@ program
89
91
  }
90
92
  }
91
93
 
92
- spinner.succeed("Done!");
94
+ console.log();
93
95
 
94
96
  // Save JSON output automatically (unless --json-only)
95
97
  if (!opts.jsonOnly) {
@@ -109,14 +111,14 @@ program
109
111
 
110
112
  console.log(
111
113
  chalk.dim(
112
- `\n💾 JSON saved to: ${chalk.cyan(
114
+ `💾 JSON saved to: ${chalk.hex('#8BE9FD')(
113
115
  `output/${domain}/${filename}`
114
116
  )}`
115
117
  )
116
118
  );
117
119
  } catch (err) {
118
120
  console.log(
119
- chalk.yellow(`⚠ Could not save JSON file: ${err.message}`)
121
+ chalk.hex('#FFB86C')(`⚠ Could not save JSON file: ${err.message}`)
120
122
  );
121
123
  }
122
124
  }
@@ -125,6 +127,7 @@ program
125
127
  if (opts.jsonOnly) {
126
128
  console.log(JSON.stringify(result, null, 2));
127
129
  } else {
130
+ console.log();
128
131
  displayResults(result, { verboseColors: opts.verboseColors });
129
132
  }
130
133
  } catch (err) {
@@ -140,7 +143,7 @@ program
140
143
 
141
144
  if (!opts.debug) {
142
145
  console.log(
143
- chalk.yellow(
146
+ chalk.hex('#FFB86C')(
144
147
  "\nTip: Try with --debug flag for tough sites and detailed error logs"
145
148
  )
146
149
  );