@dev-lines/core 0.1.0 โ†’ 0.2.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
@@ -8,7 +8,10 @@ A framework-agnostic **layout debug overlay**. Draws guides, depth-colored secti
8
8
  - ๐ŸŒˆ Depth-colored outlines around every flex/grid container (up to 12 depths)
9
9
  - ๐Ÿท๏ธ Labels: name ยท tag ยท size ยท layout, per-box or all-at-once
10
10
  - ๐Ÿ“ Hold **Alt** for spacing distances from a box to its container
11
- - ๐Ÿ“‹ Press **C** to copy a box's handle (name ยท selector ยท tag) for handing to an AI agent
11
+ - ๐ŸงŠ Box-model bands: padding + flex/grid gaps on the hovered box (**B**)
12
+ - ๐Ÿ” Inspect: **I** locks a box, arrow keys walk the tree
13
+ - ๐Ÿ“‹ Press **C** to copy a box's handle (name ยท selector ยท tag ยท size ยท display ยท padding ยท gap) for handing to an AI agent
14
+ - ๐ŸŽ›๏ธ Optional on-page toolbar pill (`toolbar: true`)
12
15
  - โšก Zero dependencies. React optional.
13
16
 
14
17
  ## Install
@@ -33,9 +36,11 @@ Toggle anytime with **โŒ˜/Ctrl + Shift + L**. Once enabled:
33
36
  | `O` | toggle outlines |
34
37
  | `G` | toggle guides |
35
38
  | `L` | cycle labels (off โ†’ hover โ†’ all) |
36
- | `C` | copy hovered box's handle |
39
+ | `I` | lock inspect on a box โ€” arrows walk the tree (โ†‘ parent, โ†“ child, โ†/โ†’ siblings) |
40
+ | `B` | toggle box-model bands (padding + gap) |
41
+ | `C` | copy the locked/hovered box's handle |
37
42
  | `Alt` (hold) | show spacing distances |
38
- | `Esc` | disable |
43
+ | `Esc` | unlock inspect ยท disable |
39
44
 
40
45
  ## Usage (React)
41
46
 
@@ -72,6 +77,11 @@ All optional. Colors are space-separated RGB triplets (e.g. `"245 104 104"`).
72
77
  | `nameAttr` | `"data-devlines-name"` | Attribute read for a box's explicit name |
73
78
  | `autoName` | `true` | Derive names from id / aria-label / component / heading |
74
79
  | `copyKey` | `"c"` | Key to copy a box handle (`null` to disable) |
80
+ | `inspectKey` | `"i"` | Key to lock/unlock inspect (`null` to disable) |
81
+ | `boxModel` | `true` | Show padding + gap bands on the hovered/locked box |
82
+ | `boxModelKey` | `"b"` | Key to toggle the box-model bands (`null` to disable) |
83
+ | `gapColor` | `"138 224 108"` | Gap band color (green) |
84
+ | `toolbar` | `false` | Mount the on-page toolbar pill |
75
85
  | `shortcut` | `"mod+shift+l"` | Toggle shortcut (`null` to disable) |
76
86
  | `labelKey` | `"l"` | Cycle-labels key (`null` to disable) |
77
87
  | `persist` | `true` | Remember on/off across reloads via localStorage |
@@ -90,9 +100,11 @@ interface DevLinesController {
90
100
  cycleLabels(mode?: "off" | "hover" | "all"): void;
91
101
  toggleOutlines(on?: boolean): void;
92
102
  toggleGuides(on?: boolean): void;
93
- update(options): void; // live-update colors / contentWidth / paddingX and redraw
94
- copy(): void; // copy hovered box's handle
95
- getState(): { enabled, outlines, guides, labels };
103
+ toggleBoxModel(on?: boolean): void;
104
+ inspect(el?: Element | null): void; // lock inspect (null unlocks, no arg toggles on hover)
105
+ update(options): void; // live-update colors / widths / labels and redraw
106
+ copy(): void; // copy the locked/hovered box's handle
107
+ getState(): { enabled, outlines, guides, labels, boxModel, inspected };
96
108
  refresh(): void;
97
109
  destroy(): void;
98
110
  }