@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.
@@ -1,4 +1,4 @@
1
- import { G as GrabbyAPI, a as GrabbyOptions } from '../types-BQDEG-Gl.cjs';
1
+ import { G as GrabbyAPI, a as GrabbyOptions } from '../types-DOAcZ0U6.cjs';
2
2
 
3
3
  interface LiveHandle {
4
4
  /** Start a feedback session and load Grabby, e.g. from your own "Give feedback" button. */
@@ -1,4 +1,4 @@
1
- import { G as GrabbyAPI, a as GrabbyOptions } from '../types-BQDEG-Gl.js';
1
+ import { G as GrabbyAPI, a as GrabbyOptions } from '../types-DOAcZ0U6.js';
2
2
 
3
3
  interface LiveHandle {
4
4
  /** Start a feedback session and load Grabby, e.g. from your own "Give feedback" button. */
@@ -87,7 +87,28 @@ interface GrabbyComment {
87
87
  pin?: {
88
88
  x: number;
89
89
  y: number;
90
- };
90
+ }; /**
91
+ * A comment on several elements at once (drag across them, or ⌘/Ctrl-click
92
+ * each). `target` is then the smallest element containing them all.
93
+ */
94
+ members?: GrabbyMember[];
95
+ /**
96
+ * A comment on a region rather than an element (drag over empty space), as
97
+ * fractions of `target`'s box. `target` is the element around the region.
98
+ */
99
+ area?: AreaBox;
100
+ }
101
+ /** One element of a multi-element comment: enough to find it, without the per-element facts. */
102
+ type GrabbyMember = Pick<GrabbyTarget, 'kind' | 'tag' | 'component' | 'source' | 'selector' | 'preview'> & {
103
+ /** Plain name for reviewers, e.g. `Button "Approve"`. */
104
+ label: string;
105
+ };
106
+ /** A rectangle as fractions (0–1) of an element's width and height. */
107
+ interface AreaBox {
108
+ x: number;
109
+ y: number;
110
+ w: number;
111
+ h: number;
91
112
  }
92
113
  interface GrabbyOptions {
93
114
  /** Keyboard shortcut to activate. Default: "Alt+G" (Option+G on Mac) */