@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 +18 -6
- package/dist/chunk-6KQDYHPD.js +869 -0
- package/dist/index.d.ts +27 -6
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +4 -3
- package/dist/chunk-MUK3OXWT.js +0 -492
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
|
-
-
|
|
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
|
-
| `
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
}
|