mesurer-solid 0.1.3-beta.0 → 0.1.3
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/AGENT_INTEGRATION.md +48 -9
- package/README.md +34 -5
- package/dist/arrange.js +2 -1
- package/dist/index.js +1863 -1465
- package/dist/inject-script.js +6 -18
- package/dist/inject.js +2220 -1822
- package/dist/screenshot.js +56 -53
- package/package.json +1 -1
- package/skills/mesurer-ui/SKILL.md +39 -1
package/AGENT_INTEGRATION.md
CHANGED
|
@@ -141,6 +141,44 @@ reviewArrange(id, tolerance?)
|
|
|
141
141
|
|
|
142
142
|
There is no `send`, `screenshots`, or `sendContext` delivery capability. Screenshot bytes stay with the outer browser harness.
|
|
143
143
|
|
|
144
|
+
## Broad Mesurer/context requests mean inspect all human intent
|
|
145
|
+
|
|
146
|
+
If the user says “check Mesurer,” “check Measure,” “look at Mesurer context,” “see what I highlighted/moved/annotated,” or otherwise asks generally about Mesurer state, treat that as a request to inspect the **combined live review state**, not only the return value of `context()`.
|
|
147
|
+
|
|
148
|
+
Start with a non-destructive inventory:
|
|
149
|
+
|
|
150
|
+
```js
|
|
151
|
+
const capabilities = window.__MESURER__.capabilities().capabilities
|
|
152
|
+
const workspace = await window.__MESURER__.context()
|
|
153
|
+
const annotations = await window.__MESURER__.annotations()
|
|
154
|
+
const arrangements = capabilities.arrange
|
|
155
|
+
? await window.__MESURER__.arrangements()
|
|
156
|
+
: []
|
|
157
|
+
|
|
158
|
+
let selection = null
|
|
159
|
+
try {
|
|
160
|
+
selection = await window.__MESURER__.context({ scope: "selection" })
|
|
161
|
+
} catch {}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Then resolve the saved human intent that is relevant to the task:
|
|
165
|
+
|
|
166
|
+
```js
|
|
167
|
+
const annotationContexts = await Promise.all(
|
|
168
|
+
annotations.map((annotation) =>
|
|
169
|
+
window.__MESURER__.context({ annotation: annotation.id })
|
|
170
|
+
),
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
const arrangeIntents = await Promise.all(
|
|
174
|
+
arrangements.map((intent) => window.__MESURER__.arrange(intent.id)),
|
|
175
|
+
)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Bring the useful pieces together before editing: target-bound notes, current selection, Arrange Before/Desired geometry, guides, measurements, held distances, exact target inspection, layout/style data, rulers/X-ray state, and any existing human screenshot preview that must be preserved.
|
|
179
|
+
|
|
180
|
+
The user may have selected one element, annotated another, moved a group with Arrange, and left measurements/guides that explain the relationship. Those are not separate conversations. They are one encoded visual request. Do not ask the person to repeat information Mesurer already contains, and do not overwrite one channel before reading the others.
|
|
181
|
+
|
|
144
182
|
## Arrange has highest human-intent precedence
|
|
145
183
|
|
|
146
184
|
Arrange lets a person reposition selected rendered elements into the layout they want without editing application source. If Arrange is available, consume relevant saved intents before changing human selection or editing source:
|
|
@@ -441,15 +479,16 @@ A good harness-level loop is:
|
|
|
441
479
|
|
|
442
480
|
```text
|
|
443
481
|
1. discover/reuse Mesurer and preserve human state
|
|
444
|
-
2.
|
|
445
|
-
3.
|
|
446
|
-
4.
|
|
447
|
-
5.
|
|
448
|
-
6.
|
|
449
|
-
7.
|
|
450
|
-
8.
|
|
451
|
-
9.
|
|
452
|
-
10.
|
|
482
|
+
2. if the request is broad, inventory Arrange + annotations + selection + workspace context before narrowing
|
|
483
|
+
3. consume relevant Arrange intent first
|
|
484
|
+
4. capture Before/Desired when useful, before source edits
|
|
485
|
+
5. consume existing annotation/selection context
|
|
486
|
+
6. resolve exact targets; ask only when genuinely ambiguous
|
|
487
|
+
7. edit normal source
|
|
488
|
+
8. wait for stable render
|
|
489
|
+
9. switch Arrange to Live when applicable
|
|
490
|
+
10. get fresh Arrange review/context and optional screenshot
|
|
491
|
+
11. iterate until rendered evidence supports completion
|
|
453
492
|
```
|
|
454
493
|
|
|
455
494
|
Do not clear Arrange history, alter human measurements/guides, replace live Mesurer state, or use a temporary preview to make unfinished source work appear correct.
|
package/README.md
CHANGED
|
@@ -77,7 +77,31 @@ import { mountMesurer } from "mesurer-solid"
|
|
|
77
77
|
const mesurer = mountMesurer()
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
The base inspector includes Select, X-ray,
|
|
80
|
+
The base inspector includes Select, X-ray, Rulers, Text Inspector, Guides, Distance, Settings, the plugin host, and the low-level inspection API. Color Picker is also available when the host exposes an operational native `EyeDropper`; it is intentionally hidden in unsupported hosts and has no DOM/CSS fallback.
|
|
81
|
+
|
|
82
|
+
Text Inspector can inspect rendered typography and supports reversible Desired-text preview editing on double-click.
|
|
83
|
+
|
|
84
|
+
### Keyboard shortcuts
|
|
85
|
+
|
|
86
|
+
| Shortcut | Action |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `M` | Toggle Mesurer visibility |
|
|
89
|
+
| `S` | Select |
|
|
90
|
+
| `X` | X-ray |
|
|
91
|
+
| `P` | Native Color Picker when supported |
|
|
92
|
+
| `R` | Rulers |
|
|
93
|
+
| `A` | Text Inspector |
|
|
94
|
+
| `G` | Guides |
|
|
95
|
+
| `H` / `V` | Choose horizontal / vertical guide orientation |
|
|
96
|
+
| `Alt` / `Option` | Distance overlay |
|
|
97
|
+
| `Cmd/Ctrl + ,` | Settings |
|
|
98
|
+
| `Shift + A` | Arrange when `arrangePlugin()` is mounted |
|
|
99
|
+
| `Shift + S` | Screenshot when `screenshotPlugin()` is mounted |
|
|
100
|
+
| `C` | Copy Context when `contextPlugin()` is mounted |
|
|
101
|
+
| `Shift + C` | Copy Selection when `contextPlugin()` is mounted |
|
|
102
|
+
| `N` | Add Note when `contextPlugin()` is mounted |
|
|
103
|
+
|
|
104
|
+
In the current Codex browser host, Color Picker is not advertised and `P` is inert because native screen sampling is not operational there.
|
|
81
105
|
|
|
82
106
|
## Arrange
|
|
83
107
|
|
|
@@ -92,7 +116,7 @@ const mesurer = mountMesurer({
|
|
|
92
116
|
})
|
|
93
117
|
```
|
|
94
118
|
|
|
95
|
-
Select one or more page elements, click **Arrange**, and drag the selection. Hold **Shift** while dragging to lock movement to the dominant axis.
|
|
119
|
+
Select one or more page elements, click **Arrange** or press **Shift+A**, and drag the selection. Arrange activates Select automatically and stays coordinated with selection state. Hold **Shift** while dragging to lock movement to the dominant axis.
|
|
96
120
|
|
|
97
121
|
Each completed drag records one persisted, undoable intent containing:
|
|
98
122
|
|
|
@@ -204,7 +228,7 @@ Every selector must resolve to exactly one page target. Invalid, missing, or amb
|
|
|
204
228
|
|
|
205
229
|
## Annotations and review
|
|
206
230
|
|
|
207
|
-
|
|
231
|
+
Mesurer Solid context annotations are semantic, target-bound review records. A note stays attached to the rendered element or region the person selected and keeps an immutable baseline together with the structured context around that target.
|
|
208
232
|
|
|
209
233
|
```js
|
|
210
234
|
const annotations = await window.__MESURER__.annotations()
|
|
@@ -220,7 +244,11 @@ await window.__MESURER__.stable()
|
|
|
220
244
|
const review = await window.__MESURER__.review(annotationId)
|
|
221
245
|
```
|
|
222
246
|
|
|
223
|
-
Review reports concrete pixel changes and missing evidence rather than relying on source assumptions.
|
|
247
|
+
Review reports concrete pixel changes and missing evidence rather than relying on source assumptions. Because the annotation already carries target identity, geometry, measurements, distances, guides, styles, and layout context, a coding agent can read what was highlighted directly instead of inferring intent from a drawn arrow or screenshot markup.
|
|
248
|
+
|
|
249
|
+
Upstream Mesurer `0.1.1` added a separate drawing workflow with arrows, freehand pen strokes, text drawings, transforms, and grouped annotation tools. Mesurer Solid intentionally does not adopt that drawing surface for the current product. Its annotation workflow is designed around structured context that an agent can consume and review against the same rendered target. Screenshots remain a separate optional tool for cases where real pixel evidence is useful.
|
|
250
|
+
|
|
251
|
+
The current upstream audit and intentional differences are documented in [`docs/UPSTREAM_PARITY.md`](https://github.com/jhomra21/mesurer-solid/blob/main/docs/UPSTREAM_PARITY.md).
|
|
224
252
|
|
|
225
253
|
## Agent integration
|
|
226
254
|
|
|
@@ -276,7 +304,7 @@ const mesurer = mountMesurer({
|
|
|
276
304
|
})
|
|
277
305
|
```
|
|
278
306
|
|
|
279
|
-
The human camera tool supports drag-region visible-tab capture, HiDPI/Retina-aware PNG cropping, copy/download settings, a draggable thumbnail, and a larger Copy/Save viewer.
|
|
307
|
+
The human camera tool supports **Shift+S**, drag-region visible-tab capture, HiDPI/Retina-aware PNG cropping, copy/download settings, a draggable thumbnail, and a larger Copy/Save viewer.
|
|
280
308
|
|
|
281
309
|
For coding-agent verification, the outer browser harness should normally own screenshot bytes. Mesurer supplies exact capture scope and can temporarily remove inspector presentation:
|
|
282
310
|
|
|
@@ -330,6 +358,7 @@ Mesurer's renderer is bundled and isolated from the host framework. Supported ho
|
|
|
330
358
|
- [Context workflow](https://github.com/jhomra21/mesurer-solid/blob/main/docs/CONTEXT_WORKFLOW.md)
|
|
331
359
|
- [Screenshots](https://github.com/jhomra21/mesurer-solid/blob/main/docs/SCREENSHOTS.md)
|
|
332
360
|
- [Host isolation](https://github.com/jhomra21/mesurer-solid/blob/main/docs/HOST_ISOLATION.md)
|
|
361
|
+
- [Upstream audit and intentional differences](https://github.com/jhomra21/mesurer-solid/blob/main/docs/UPSTREAM_PARITY.md)
|
|
333
362
|
- [Agent integration](./AGENT_INTEGRATION.md)
|
|
334
363
|
|
|
335
364
|
## License
|
package/dist/arrange.js
CHANGED
|
@@ -2761,6 +2761,7 @@ var Qn = "mesurer.arrange", $n = "arrange", er = "mesurer.arrange.intents", tr =
|
|
|
2761
2761
|
e.tool.register({
|
|
2762
2762
|
id: "arrange",
|
|
2763
2763
|
label: "Arrange",
|
|
2764
|
+
shortcut: "Shift+A",
|
|
2764
2765
|
order: 65,
|
|
2765
2766
|
command: ar,
|
|
2766
2767
|
icon: mr,
|
|
@@ -2899,7 +2900,7 @@ var Qn = "mesurer.arrange", $n = "arrange", er = "mesurer.arrange.intents", tr =
|
|
|
2899
2900
|
].join(",");
|
|
2900
2901
|
//#endregion
|
|
2901
2902
|
//#region src/version.ts
|
|
2902
|
-
var jr = "0.1.3
|
|
2903
|
+
var jr = "0.1.3", Mr = tr, Nr = Qn, Pr = $n, Fr = nr, Ir = er, Lr = () => ({
|
|
2903
2904
|
...Ar(),
|
|
2904
2905
|
version: jr
|
|
2905
2906
|
});
|