@comty.io/core 0.1.0 → 0.1.1
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 +7 -1
- package/comty-sdk.js +1046 -210
- package/package.json +2 -2
- package/src/browser.js +531 -99
- package/src/capture.js +104 -1
- package/src/dev.mjs +3 -2
- package/src/measurements.js +209 -0
- package/src/style.js +203 -111
- package/src/vite.mjs +3 -2
package/README.md
CHANGED
|
@@ -35,7 +35,13 @@ Choose one browser entry per page (npm, development injection, or CDN). Both dis
|
|
|
35
35
|
|
|
36
36
|
Element inspection shows a copyable CSS custom-property name above foreground/background colors when the winning declaration can be identified. It handles ordinary selectors, `:where()`, inline styles, inheritance, `!important`, active media/supports rules and named top-level cascade layers. Semantic aliases retain their declared name. No extra line is rendered for literal colors or uncertain provenance (including inaccessible stylesheets, shadow/scoped or nested cascades, and unsupported functional selectors).
|
|
37
37
|
|
|
38
|
-
The screen pipette receives a pixel color and copies its HEX value. When an inspected element has an identifiable background token whose rendered color matches the sample, the toast shows that token as **Element token · --name**. The native pipette does not report which element produced the pixel, so the label describes the inspected element rather than attributing the sampled pixel. Matching variable values alone do not produce a label. No additional dependency is required.
|
|
38
|
+
The toolbar pipette shows a circular nine-pixel magnifier from a local DOM snapshot, keeping the toolbar interactive with normal UI cursors. Its light/dark ring follows the sampled colour. Scrolling or resizing refreshes the snapshot. Inaccessible images, canvas/video, external fonts and live animations may differ from screen pixels; use native screen sampling for those. If a readable snapshot cannot be created, selection falls back to the element’s CSS colour. Shift-click the pipette in Chrome or Edge to sample screen pixels instead (including images). The screen pipette receives a pixel color and copies its HEX value. When an inspected element has an identifiable background token whose rendered color matches the sample, the toast shows that token as **Element token · --name**. The native pipette does not report which element produced the pixel, so the label describes the inspected element rather than attributing the sampled pixel. Matching variable values alone do not produce a label. No additional dependency is required.
|
|
39
|
+
|
|
40
|
+
## Border measurements
|
|
41
|
+
|
|
42
|
+
Open inspection with **Shift I**, then choose the ruler tool or press **R**. Move close to an element or page border: a red point marks the snapped start and the cursor shows the measurement axis. Drag to another border to measure its distance. Horizontal borders produce vertical measurements; side borders produce horizontal measurements. Releasing away from a border keeps the endpoint at that page position.
|
|
43
|
+
|
|
44
|
+
You can place several measurements. Their arrows and pixel labels remain visible, and element anchors follow scrolling, resizing and transforms. **Escape** cancels an unfinished drag; pressing it again exits measurement. Turning off the ruler tool or changing modes clears the measurements. They stay local to the current page and are never saved or uploaded. Pixel rulers and draggable guides remain available.
|
|
39
45
|
|
|
40
46
|
## Live motion
|
|
41
47
|
|