@githumbi/grabby 0.1.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +22 -0
  3. package/README.md +262 -0
  4. package/builders.json +14 -0
  5. package/dist/angular/index.d.ts +279 -0
  6. package/dist/angular/index.js +5145 -0
  7. package/dist/angular/index.js.map +1 -0
  8. package/dist/babel-plugin/index.cjs +95 -0
  9. package/dist/babel-plugin/index.cjs.map +1 -0
  10. package/dist/babel-plugin/index.d.cts +28 -0
  11. package/dist/babel-plugin/index.d.ts +28 -0
  12. package/dist/babel-plugin/index.js +60 -0
  13. package/dist/babel-plugin/index.js.map +1 -0
  14. package/dist/builder/builders/application/index.js +141 -0
  15. package/dist/builder/builders/application/index.js.map +1 -0
  16. package/dist/builder/builders/application/schema.json +7 -0
  17. package/dist/builder/builders/dev-server/index.js +137 -0
  18. package/dist/builder/builders/dev-server/index.js.map +1 -0
  19. package/dist/builder/builders/dev-server/schema.json +26 -0
  20. package/dist/builder/index.js +2 -0
  21. package/dist/builder/index.js.map +1 -0
  22. package/dist/builder/package.json +1 -0
  23. package/dist/chunk-6CBIOKZV.cjs +45 -0
  24. package/dist/chunk-6CBIOKZV.cjs.map +1 -0
  25. package/dist/chunk-M3DOFJA7.js +45 -0
  26. package/dist/chunk-M3DOFJA7.js.map +1 -0
  27. package/dist/cli/index.js +406 -0
  28. package/dist/cli/index.js.map +1 -0
  29. package/dist/core/index.cjs +5081 -0
  30. package/dist/core/index.cjs.map +1 -0
  31. package/dist/core/index.d.cts +96 -0
  32. package/dist/core/index.d.ts +96 -0
  33. package/dist/core/index.js +5081 -0
  34. package/dist/core/index.js.map +1 -0
  35. package/dist/esbuild-plugin/index.cjs +134 -0
  36. package/dist/esbuild-plugin/index.cjs.map +1 -0
  37. package/dist/esbuild-plugin/index.d.cts +21 -0
  38. package/dist/esbuild-plugin/index.d.ts +21 -0
  39. package/dist/esbuild-plugin/index.js +96 -0
  40. package/dist/esbuild-plugin/index.js.map +1 -0
  41. package/dist/export/index.cjs +166 -0
  42. package/dist/export/index.cjs.map +1 -0
  43. package/dist/export/index.d.cts +86 -0
  44. package/dist/export/index.d.ts +86 -0
  45. package/dist/export/index.js +137 -0
  46. package/dist/export/index.js.map +1 -0
  47. package/dist/grabby.global.js +635 -0
  48. package/dist/live/index.cjs +30 -0
  49. package/dist/live/index.cjs.map +1 -0
  50. package/dist/live/index.d.cts +20 -0
  51. package/dist/live/index.d.ts +20 -0
  52. package/dist/live/index.js +30 -0
  53. package/dist/live/index.js.map +1 -0
  54. package/dist/loader.global.js +1 -0
  55. package/dist/plugin/index.cjs +229 -0
  56. package/dist/plugin/index.cjs.map +1 -0
  57. package/dist/plugin/index.d.cts +76 -0
  58. package/dist/plugin/index.d.ts +76 -0
  59. package/dist/plugin/index.js +186 -0
  60. package/dist/plugin/index.js.map +1 -0
  61. package/dist/react/index.d.ts +290 -0
  62. package/dist/react/index.js +5110 -0
  63. package/dist/react/index.js.map +1 -0
  64. package/dist/types-CMgpkvBz.d.cts +265 -0
  65. package/dist/types-CMgpkvBz.d.ts +265 -0
  66. package/package.json +191 -0
@@ -0,0 +1,265 @@
1
+ /**
2
+ * Teaches Grabby about one UI framework: how to name the component that owns
3
+ * an element, and where that element was written. Adapters only read what the
4
+ * framework already leaves on DOM nodes in development builds, so none of
5
+ * them import the framework itself.
6
+ */
7
+ interface FrameworkAdapter {
8
+ /** Shown in exports, e.g. "React", "Vue". */
9
+ name: string;
10
+ resolveComponent: ComponentResolver;
11
+ resolveSource?: SourceResolver;
12
+ /** Drops framework-generated classes (scoping hashes and the like). */
13
+ cleanClasses?: (classes: string[]) => string[];
14
+ }
15
+
16
+ type ThemeMode = 'light';
17
+ /** What kind of UI the comment is about; decides which facts get captured. */
18
+ type TargetKind = 'action' | 'field' | 'text' | 'media' | 'container' | 'section';
19
+ /** How much context the export includes. */
20
+ type DetailLevel = 'compact' | 'standard' | 'detailed';
21
+ interface SourceLocation {
22
+ file: string;
23
+ line: number | null;
24
+ column: number | null;
25
+ }
26
+ interface StackFrame {
27
+ name: string;
28
+ file: string | null;
29
+ line: number | null;
30
+ }
31
+ /** The compact, serialisable description of the element a comment is about. */
32
+ interface GrabbyTarget {
33
+ kind: TargetKind;
34
+ tag: string;
35
+ component: string | null;
36
+ source: SourceLocation | null;
37
+ /** Up to 3 of the app's own component frames, innermost first. */
38
+ stack: StackFrame[];
39
+ /** Unique CSS selector. Exported only when there is no source location. */
40
+ selector: string;
41
+ /** Trimmed opening tag plus a text excerpt, at most ~300 characters. */
42
+ preview: string;
43
+ /** Kind-specific facts for the standard export, in display order. */
44
+ facts: Record<string, string>;
45
+ /** Extra facts only shown at the detailed level. */
46
+ extra: Record<string, string>;
47
+ }
48
+ interface CommentAuthor {
49
+ name: string | null;
50
+ anonymous: boolean;
51
+ /** Stable random id per browser, so anonymous commenters stay distinguishable. */
52
+ sessionId: string;
53
+ /** The host app's own user id, when it called `identify()`. */
54
+ userId?: string;
55
+ }
56
+ interface PageInfo {
57
+ /** Pathname only; query strings are dropped unless allowlisted. */
58
+ route: string;
59
+ title: string;
60
+ viewport: [number, number];
61
+ }
62
+ interface ScreenshotRef {
63
+ /** Key of the image in this browser's IndexedDB. */
64
+ localId?: string;
65
+ /** Where a server stored it, once uploaded. */
66
+ url?: string;
67
+ width: number;
68
+ height: number;
69
+ }
70
+ interface GrabbyComment {
71
+ id: string;
72
+ createdAt: number;
73
+ updatedAt: number;
74
+ status: 'open' | 'resolved';
75
+ comment: string;
76
+ author: CommentAuthor;
77
+ page: PageInfo;
78
+ target: GrabbyTarget;
79
+ screenshot: ScreenshotRef | null;
80
+ framework: string;
81
+ /** Delivery to a Grabby server, when one is configured. Browser-only. */
82
+ sync?: 'pending' | 'sent' | 'failed';
83
+ }
84
+ interface ToolbarState {
85
+ visible: boolean;
86
+ themeMode: ThemeMode;
87
+ comments: GrabbyComment[];
88
+ }
89
+ interface GrabbyOptions {
90
+ /** Keyboard shortcut to activate. Default: "Alt+G" (Option+G on Mac) */
91
+ activationKey: string;
92
+ /** Whether activation requires hold or toggle. Default: 'toggle' */
93
+ activationMode: 'hold' | 'toggle';
94
+ /** Milliseconds to hold before activating in hold mode. Default: 0 */
95
+ keyHoldDuration: number;
96
+ /** Master on/off switch. Default: true */
97
+ enabled: boolean;
98
+ /** Allow activation while focused in input/textarea. Default: false */
99
+ enableInInputs: boolean;
100
+ /** Only activate in dev mode. Default: true */
101
+ devOnly: boolean;
102
+ /** Show the floating mini toolbar. Default: true */
103
+ showToolbar: boolean;
104
+ /** Theme mode for all UI. Default: 'light' */
105
+ themeMode: ThemeMode;
106
+ /**
107
+ * 'local' (default): for developers on their own machine; dev builds only.
108
+ * 'live': for collecting feedback on a deployed site. Grabby stays hidden
109
+ * until someone opens a feedback link (?grabby=<projectKey>), and works in
110
+ * production builds.
111
+ */
112
+ mode: 'local' | 'live';
113
+ /**
114
+ * A grabby-server URL. Comments are saved in the browser and delivered
115
+ * there (with retries), where you pull them or your agent reads them over
116
+ * MCP. Locally: 'http://localhost:3456'.
117
+ */
118
+ server?: string;
119
+ /** The project's public key from `grabby-server init`. Required for a public server. */
120
+ projectKey?: string;
121
+ /**
122
+ * Who a comment is from. 'ask' prompts for a name (or anonymous) on the
123
+ * first comment; 'anonymous' never asks; 'none' skips identity entirely.
124
+ * Default: 'ask' in live mode, 'none' locally.
125
+ */
126
+ identity?: 'ask' | 'anonymous' | 'none';
127
+ /** Also POST each comment as JSON to this URL (https, or http://localhost). */
128
+ webhookUrl?: string;
129
+ /** Persist comments across page refresh via localStorage. Default: true */
130
+ persistHistory: boolean;
131
+ /**
132
+ * Also copy each comment to the clipboard as soon as it's saved. Default:
133
+ * false: comments collect until you use Copy all.
134
+ */
135
+ copyOnComment: boolean;
136
+ /** Default detail level for exports. Default: 'standard' */
137
+ detailLevel: DetailLevel;
138
+ /** Capture a screenshot of the commented element. Default: true */
139
+ screenshots: boolean;
140
+ /** Query parameters worth keeping in the recorded route, e.g. ['tab']. Default: [] */
141
+ captureQueryParams: string[];
142
+ /**
143
+ * Framework adapters to try, in order. Default: every built-in adapter
144
+ * (Angular, React, Vue, Svelte, then plain HTML), detected per element.
145
+ */
146
+ adapters?: FrameworkAdapter[];
147
+ /**
148
+ * CSP nonce for Grabby's `<style>` elements. Only used in browsers without
149
+ * constructable stylesheets; elsewhere styles need no CSP allowance.
150
+ */
151
+ styleNonce?: string;
152
+ }
153
+ interface ComponentStackEntry {
154
+ name: string;
155
+ filePath: string | null;
156
+ line: number | null;
157
+ column: number | null;
158
+ }
159
+ interface ElementContext {
160
+ element: Element;
161
+ html: string;
162
+ componentName: string | null;
163
+ filePath: string | null;
164
+ line: number | null;
165
+ column: number | null;
166
+ componentStack: ComponentStackEntry[];
167
+ selector: string;
168
+ cssClasses: string[];
169
+ }
170
+ interface PluginHooks {
171
+ onActivate?: () => void;
172
+ onDeactivate?: () => void;
173
+ onElementHover?: (element: Element) => void;
174
+ onElementSelect?: (element: Element) => void;
175
+ /**
176
+ * A comment was saved. Fires whether or not anything reached the clipboard,
177
+ * so use this to persist or forward comments.
178
+ */
179
+ onComment?: (comment: GrabbyComment, element: Element | null) => void;
180
+ /** A saved comment gained its screenshot (it's captured asynchronously). */
181
+ onScreenshot?: (comment: GrabbyComment, image: Blob) => void;
182
+ onCopySuccess?: (text: string, comments: GrabbyComment[]) => void;
183
+ onCopyError?: (error: Error) => void;
184
+ /** Rewrite exported text before it reaches the clipboard. */
185
+ transformCopyContent?: (text: string, comments: GrabbyComment[]) => string;
186
+ }
187
+ interface Theme {
188
+ overlayBorderColor: string;
189
+ overlayBgColor: string;
190
+ labelBgColor: string;
191
+ labelTextColor: string;
192
+ toastBgColor: string;
193
+ toastTextColor: string;
194
+ toolbarBgColor: string;
195
+ toolbarTextColor: string;
196
+ toolbarAccentColor: string;
197
+ popoverBgColor: string;
198
+ popoverTextColor: string;
199
+ popoverBorderColor: string;
200
+ }
201
+ interface Plugin {
202
+ name: string;
203
+ hooks?: PluginHooks;
204
+ theme?: Partial<Theme>;
205
+ options?: Partial<GrabbyOptions>;
206
+ setup?: (api: GrabbyAPI) => PluginCleanup | void;
207
+ }
208
+ type PluginCleanup = () => void;
209
+ type ComponentResolver = (element: Element) => {
210
+ name: string | null;
211
+ hostElement: Element | null;
212
+ /**
213
+ * Owning components, innermost first. An entry can carry its own location
214
+ * when the framework knows it; otherwise it's resolved from `hostElement`.
215
+ */
216
+ stack?: Array<{
217
+ name: string;
218
+ hostElement: Element | null;
219
+ filePath?: string | null;
220
+ line?: number | null;
221
+ }>;
222
+ } | null;
223
+ type SourceResolver = (element: Element) => {
224
+ filePath: string | null;
225
+ line: number | null;
226
+ column: number | null;
227
+ } | null;
228
+ interface GrabbyAPI {
229
+ activate(): void;
230
+ deactivate(): void;
231
+ toggle(): void;
232
+ isActive(): boolean;
233
+ setOptions(opts: Partial<GrabbyOptions>): void;
234
+ registerPlugin(plugin: Plugin): void;
235
+ unregisterPlugin(name: string): void;
236
+ setComponentResolver(resolver: ComponentResolver): void;
237
+ setSourceResolver(resolver: SourceResolver): void;
238
+ showToolbar(): void;
239
+ hideToolbar(): void;
240
+ setThemeMode(mode: ThemeMode): void;
241
+ /** Open comments, newest first. */
242
+ getComments(): GrabbyComment[];
243
+ /** Export text for the given (default: all) comments at a detail level. */
244
+ exportComments(options?: {
245
+ level?: DetailLevel;
246
+ ids?: string[];
247
+ }): string;
248
+ deleteComment(id: string): void;
249
+ clearComments(): void;
250
+ /**
251
+ * Tell Grabby who is signed in, so commenters aren't asked for a name.
252
+ * Pass null on sign-out.
253
+ */
254
+ identify(user: {
255
+ id?: string;
256
+ name: string;
257
+ } | null): void;
258
+ /** Show Grabby. In live mode this starts a feedback session for this tab. */
259
+ show(): void;
260
+ /** Hide Grabby. In live mode this ends the feedback session. */
261
+ hide(): void;
262
+ dispose(): void;
263
+ }
264
+
265
+ export type { ComponentResolver as C, DetailLevel as D, ElementContext as E, FrameworkAdapter as F, GrabbyAPI as G, PageInfo as P, SourceResolver as S, TargetKind as T, GrabbyOptions as a, GrabbyComment as b, GrabbyTarget as c, CommentAuthor as d, ComponentStackEntry as e, Plugin as f, PluginCleanup as g, PluginHooks as h, ScreenshotRef as i, SourceLocation as j, StackFrame as k, Theme as l, ThemeMode as m, ToolbarState as n };
@@ -0,0 +1,265 @@
1
+ /**
2
+ * Teaches Grabby about one UI framework: how to name the component that owns
3
+ * an element, and where that element was written. Adapters only read what the
4
+ * framework already leaves on DOM nodes in development builds, so none of
5
+ * them import the framework itself.
6
+ */
7
+ interface FrameworkAdapter {
8
+ /** Shown in exports, e.g. "React", "Vue". */
9
+ name: string;
10
+ resolveComponent: ComponentResolver;
11
+ resolveSource?: SourceResolver;
12
+ /** Drops framework-generated classes (scoping hashes and the like). */
13
+ cleanClasses?: (classes: string[]) => string[];
14
+ }
15
+
16
+ type ThemeMode = 'light';
17
+ /** What kind of UI the comment is about; decides which facts get captured. */
18
+ type TargetKind = 'action' | 'field' | 'text' | 'media' | 'container' | 'section';
19
+ /** How much context the export includes. */
20
+ type DetailLevel = 'compact' | 'standard' | 'detailed';
21
+ interface SourceLocation {
22
+ file: string;
23
+ line: number | null;
24
+ column: number | null;
25
+ }
26
+ interface StackFrame {
27
+ name: string;
28
+ file: string | null;
29
+ line: number | null;
30
+ }
31
+ /** The compact, serialisable description of the element a comment is about. */
32
+ interface GrabbyTarget {
33
+ kind: TargetKind;
34
+ tag: string;
35
+ component: string | null;
36
+ source: SourceLocation | null;
37
+ /** Up to 3 of the app's own component frames, innermost first. */
38
+ stack: StackFrame[];
39
+ /** Unique CSS selector. Exported only when there is no source location. */
40
+ selector: string;
41
+ /** Trimmed opening tag plus a text excerpt, at most ~300 characters. */
42
+ preview: string;
43
+ /** Kind-specific facts for the standard export, in display order. */
44
+ facts: Record<string, string>;
45
+ /** Extra facts only shown at the detailed level. */
46
+ extra: Record<string, string>;
47
+ }
48
+ interface CommentAuthor {
49
+ name: string | null;
50
+ anonymous: boolean;
51
+ /** Stable random id per browser, so anonymous commenters stay distinguishable. */
52
+ sessionId: string;
53
+ /** The host app's own user id, when it called `identify()`. */
54
+ userId?: string;
55
+ }
56
+ interface PageInfo {
57
+ /** Pathname only; query strings are dropped unless allowlisted. */
58
+ route: string;
59
+ title: string;
60
+ viewport: [number, number];
61
+ }
62
+ interface ScreenshotRef {
63
+ /** Key of the image in this browser's IndexedDB. */
64
+ localId?: string;
65
+ /** Where a server stored it, once uploaded. */
66
+ url?: string;
67
+ width: number;
68
+ height: number;
69
+ }
70
+ interface GrabbyComment {
71
+ id: string;
72
+ createdAt: number;
73
+ updatedAt: number;
74
+ status: 'open' | 'resolved';
75
+ comment: string;
76
+ author: CommentAuthor;
77
+ page: PageInfo;
78
+ target: GrabbyTarget;
79
+ screenshot: ScreenshotRef | null;
80
+ framework: string;
81
+ /** Delivery to a Grabby server, when one is configured. Browser-only. */
82
+ sync?: 'pending' | 'sent' | 'failed';
83
+ }
84
+ interface ToolbarState {
85
+ visible: boolean;
86
+ themeMode: ThemeMode;
87
+ comments: GrabbyComment[];
88
+ }
89
+ interface GrabbyOptions {
90
+ /** Keyboard shortcut to activate. Default: "Alt+G" (Option+G on Mac) */
91
+ activationKey: string;
92
+ /** Whether activation requires hold or toggle. Default: 'toggle' */
93
+ activationMode: 'hold' | 'toggle';
94
+ /** Milliseconds to hold before activating in hold mode. Default: 0 */
95
+ keyHoldDuration: number;
96
+ /** Master on/off switch. Default: true */
97
+ enabled: boolean;
98
+ /** Allow activation while focused in input/textarea. Default: false */
99
+ enableInInputs: boolean;
100
+ /** Only activate in dev mode. Default: true */
101
+ devOnly: boolean;
102
+ /** Show the floating mini toolbar. Default: true */
103
+ showToolbar: boolean;
104
+ /** Theme mode for all UI. Default: 'light' */
105
+ themeMode: ThemeMode;
106
+ /**
107
+ * 'local' (default): for developers on their own machine; dev builds only.
108
+ * 'live': for collecting feedback on a deployed site. Grabby stays hidden
109
+ * until someone opens a feedback link (?grabby=<projectKey>), and works in
110
+ * production builds.
111
+ */
112
+ mode: 'local' | 'live';
113
+ /**
114
+ * A grabby-server URL. Comments are saved in the browser and delivered
115
+ * there (with retries), where you pull them or your agent reads them over
116
+ * MCP. Locally: 'http://localhost:3456'.
117
+ */
118
+ server?: string;
119
+ /** The project's public key from `grabby-server init`. Required for a public server. */
120
+ projectKey?: string;
121
+ /**
122
+ * Who a comment is from. 'ask' prompts for a name (or anonymous) on the
123
+ * first comment; 'anonymous' never asks; 'none' skips identity entirely.
124
+ * Default: 'ask' in live mode, 'none' locally.
125
+ */
126
+ identity?: 'ask' | 'anonymous' | 'none';
127
+ /** Also POST each comment as JSON to this URL (https, or http://localhost). */
128
+ webhookUrl?: string;
129
+ /** Persist comments across page refresh via localStorage. Default: true */
130
+ persistHistory: boolean;
131
+ /**
132
+ * Also copy each comment to the clipboard as soon as it's saved. Default:
133
+ * false: comments collect until you use Copy all.
134
+ */
135
+ copyOnComment: boolean;
136
+ /** Default detail level for exports. Default: 'standard' */
137
+ detailLevel: DetailLevel;
138
+ /** Capture a screenshot of the commented element. Default: true */
139
+ screenshots: boolean;
140
+ /** Query parameters worth keeping in the recorded route, e.g. ['tab']. Default: [] */
141
+ captureQueryParams: string[];
142
+ /**
143
+ * Framework adapters to try, in order. Default: every built-in adapter
144
+ * (Angular, React, Vue, Svelte, then plain HTML), detected per element.
145
+ */
146
+ adapters?: FrameworkAdapter[];
147
+ /**
148
+ * CSP nonce for Grabby's `<style>` elements. Only used in browsers without
149
+ * constructable stylesheets; elsewhere styles need no CSP allowance.
150
+ */
151
+ styleNonce?: string;
152
+ }
153
+ interface ComponentStackEntry {
154
+ name: string;
155
+ filePath: string | null;
156
+ line: number | null;
157
+ column: number | null;
158
+ }
159
+ interface ElementContext {
160
+ element: Element;
161
+ html: string;
162
+ componentName: string | null;
163
+ filePath: string | null;
164
+ line: number | null;
165
+ column: number | null;
166
+ componentStack: ComponentStackEntry[];
167
+ selector: string;
168
+ cssClasses: string[];
169
+ }
170
+ interface PluginHooks {
171
+ onActivate?: () => void;
172
+ onDeactivate?: () => void;
173
+ onElementHover?: (element: Element) => void;
174
+ onElementSelect?: (element: Element) => void;
175
+ /**
176
+ * A comment was saved. Fires whether or not anything reached the clipboard,
177
+ * so use this to persist or forward comments.
178
+ */
179
+ onComment?: (comment: GrabbyComment, element: Element | null) => void;
180
+ /** A saved comment gained its screenshot (it's captured asynchronously). */
181
+ onScreenshot?: (comment: GrabbyComment, image: Blob) => void;
182
+ onCopySuccess?: (text: string, comments: GrabbyComment[]) => void;
183
+ onCopyError?: (error: Error) => void;
184
+ /** Rewrite exported text before it reaches the clipboard. */
185
+ transformCopyContent?: (text: string, comments: GrabbyComment[]) => string;
186
+ }
187
+ interface Theme {
188
+ overlayBorderColor: string;
189
+ overlayBgColor: string;
190
+ labelBgColor: string;
191
+ labelTextColor: string;
192
+ toastBgColor: string;
193
+ toastTextColor: string;
194
+ toolbarBgColor: string;
195
+ toolbarTextColor: string;
196
+ toolbarAccentColor: string;
197
+ popoverBgColor: string;
198
+ popoverTextColor: string;
199
+ popoverBorderColor: string;
200
+ }
201
+ interface Plugin {
202
+ name: string;
203
+ hooks?: PluginHooks;
204
+ theme?: Partial<Theme>;
205
+ options?: Partial<GrabbyOptions>;
206
+ setup?: (api: GrabbyAPI) => PluginCleanup | void;
207
+ }
208
+ type PluginCleanup = () => void;
209
+ type ComponentResolver = (element: Element) => {
210
+ name: string | null;
211
+ hostElement: Element | null;
212
+ /**
213
+ * Owning components, innermost first. An entry can carry its own location
214
+ * when the framework knows it; otherwise it's resolved from `hostElement`.
215
+ */
216
+ stack?: Array<{
217
+ name: string;
218
+ hostElement: Element | null;
219
+ filePath?: string | null;
220
+ line?: number | null;
221
+ }>;
222
+ } | null;
223
+ type SourceResolver = (element: Element) => {
224
+ filePath: string | null;
225
+ line: number | null;
226
+ column: number | null;
227
+ } | null;
228
+ interface GrabbyAPI {
229
+ activate(): void;
230
+ deactivate(): void;
231
+ toggle(): void;
232
+ isActive(): boolean;
233
+ setOptions(opts: Partial<GrabbyOptions>): void;
234
+ registerPlugin(plugin: Plugin): void;
235
+ unregisterPlugin(name: string): void;
236
+ setComponentResolver(resolver: ComponentResolver): void;
237
+ setSourceResolver(resolver: SourceResolver): void;
238
+ showToolbar(): void;
239
+ hideToolbar(): void;
240
+ setThemeMode(mode: ThemeMode): void;
241
+ /** Open comments, newest first. */
242
+ getComments(): GrabbyComment[];
243
+ /** Export text for the given (default: all) comments at a detail level. */
244
+ exportComments(options?: {
245
+ level?: DetailLevel;
246
+ ids?: string[];
247
+ }): string;
248
+ deleteComment(id: string): void;
249
+ clearComments(): void;
250
+ /**
251
+ * Tell Grabby who is signed in, so commenters aren't asked for a name.
252
+ * Pass null on sign-out.
253
+ */
254
+ identify(user: {
255
+ id?: string;
256
+ name: string;
257
+ } | null): void;
258
+ /** Show Grabby. In live mode this starts a feedback session for this tab. */
259
+ show(): void;
260
+ /** Hide Grabby. In live mode this ends the feedback session. */
261
+ hide(): void;
262
+ dispose(): void;
263
+ }
264
+
265
+ export type { ComponentResolver as C, DetailLevel as D, ElementContext as E, FrameworkAdapter as F, GrabbyAPI as G, PageInfo as P, SourceResolver as S, TargetKind as T, GrabbyOptions as a, GrabbyComment as b, GrabbyTarget as c, CommentAuthor as d, ComponentStackEntry as e, Plugin as f, PluginCleanup as g, PluginHooks as h, ScreenshotRef as i, SourceLocation as j, StackFrame as k, Theme as l, ThemeMode as m, ToolbarState as n };