@githumbi/grabby 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @githumbi/grabby
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - dea0d95: Comment on several elements, or on an area, at once.
8
+
9
+ - **Drag to select.** In comment mode, press and drag: a box follows the mouse and the elements it takes in are outlined in green as you go. Let go and one comment covers all of them ("3 elements: Button “Approve”, Button “Reject”, Text “Total”"). A drag that takes in a single element is an ordinary comment, and a plain click works as before.
10
+ - **⌘-click (Ctrl-click on Windows and Linux)** adds elements one at a time; release the key to comment on them together.
11
+ - **Areas.** A drag over empty space comments on that region ("Area in Card “Your plan”"), saved relative to the element around it.
12
+ - Group and area comments get a green square marker; hovering it outlines every element (or the area) again, and clicking it edits the comment. Their screenshot shows just the selected region.
13
+ - While picking, Grabby keeps presses from reaching the page, so dragging doesn't select text and pickers that open on pointer-down stay closed.
14
+ - Comments carry `members` (one short entry per element: kind, tag, component, source, selector, preview and a plain label) or `area` (fractions of the element's box); `target` is the element around them. The export, `pull`, MCP and the inbox list every element with its file and line. The collector stores both; an older collector accepts these comments as single-element ones.
15
+
16
+ ## 0.5.1
17
+
18
+ ### Patch Changes
19
+
20
+ - 5905ff3: Comment markers no longer trail behind the page while it scrolls. Markers for page content now sit in page coordinates, so the browser moves them with the page itself instead of Grabby repositioning them a frame later. Markers in fixed or sticky panels stay on screen coordinates (those don't move with the page), and markers inside their own scrolling box are moved on every scroll event. A marker at the right edge is kept inside the window so it can't add a horizontal scrollbar.
21
+
3
22
  ## 0.5.0
4
23
 
5
24
  ### Minor Changes
@@ -104,7 +104,28 @@ interface GrabbyComment {
104
104
  pin?: {
105
105
  x: number;
106
106
  y: number;
107
- };
107
+ }; /**
108
+ * A comment on several elements at once (drag across them, or ⌘/Ctrl-click
109
+ * each). `target` is then the smallest element containing them all.
110
+ */
111
+ members?: GrabbyMember[];
112
+ /**
113
+ * A comment on a region rather than an element (drag over empty space), as
114
+ * fractions of `target`'s box. `target` is the element around the region.
115
+ */
116
+ area?: AreaBox;
117
+ }
118
+ /** One element of a multi-element comment: enough to find it, without the per-element facts. */
119
+ type GrabbyMember = Pick<GrabbyTarget, 'kind' | 'tag' | 'component' | 'source' | 'selector' | 'preview'> & {
120
+ /** Plain name for reviewers, e.g. `Button "Approve"`. */
121
+ label: string;
122
+ };
123
+ /** A rectangle as fractions (0–1) of an element's width and height. */
124
+ interface AreaBox {
125
+ x: number;
126
+ y: number;
127
+ w: number;
128
+ h: number;
108
129
  }
109
130
  interface GrabbyOptions {
110
131
  /** Keyboard shortcut to activate. Default: "Alt+G" (Option+G on Mac) */