review-lens-react 1.0.0 → 1.0.2

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # review-lens-react
2
2
 
3
+ <img src="https://raw.githubusercontent.com/ichichich3011/review-lens-react/main/packages/review-lens-react/review-lens-logo.svg" alt="Review Lens logo" width="64" height="64">
4
+
3
5
  `review-lens-react` is a React overlay for UX reviews inside frontend apps. Designers can inspect real DOM elements, see computed spacing and typography details, lock an element, write feedback, and store that feedback in Google Sheets. Developers can open the same app, see page comments anchored to selectors, and resolve feedback while implementing the review.
4
6
 
5
7
  The package is intended to be mounted by the host app only when review mode is needed. It does not add a global launcher by default.
@@ -102,6 +104,7 @@ Config:
102
104
  | `normalizeUrl` | no | Custom URL normalization function. |
103
105
  | `designTokens` | no | Allowed spacing, font size, line height, color, and radius values for advisory token checks. |
104
106
  | `captureScreenshot` | no | Optional hook that captures a screenshot for a selected target. |
107
+ | `emailNotifications` | no | Enables Gmail notifications for authors and assignees. Requires the Gmail send scope. |
105
108
  | `uploadAttachment` | no | Optional hook that stores screenshots and returns attachment URLs. |
106
109
  | `adapter` | no | Custom storage adapter for tests, demos, or a future backend. |
107
110
 
@@ -145,12 +148,13 @@ Official references:
145
148
 
146
149
  Open Google Cloud Console and choose the project that should own the OAuth client.
147
150
 
148
- ### 2. Enable Google Sheets API
151
+ ### 2. Enable Google APIs
149
152
 
150
153
  In Google Cloud Console:
151
154
 
152
155
  1. Go to `APIs & Services`.
153
156
  2. Enable `Google Sheets API`.
157
+ 3. Enable `Gmail API` when `emailNotifications` should send notification emails.
154
158
 
155
159
  ### 3. Configure OAuth consent
156
160
 
@@ -168,6 +172,37 @@ https://www.googleapis.com/auth/userinfo.email
168
172
 
169
173
  The Sheets scope is used to read/write feedback rows. The email scope is used to match the signed-in Google account against the `Users` tab.
170
174
 
175
+ To send review notifications from the signed-in user's Gmail account, also add:
176
+
177
+ ```text
178
+ https://www.googleapis.com/auth/gmail.send
179
+ ```
180
+
181
+ Then enable notifications in the provider config:
182
+
183
+ ```tsx
184
+ <ReviewLensProvider
185
+ config={{
186
+ googleClientId,
187
+ contentSpreadsheetId,
188
+ usersSpreadsheetId,
189
+ projectKey: "demo",
190
+ contentId: "article-123",
191
+ emailNotifications: true
192
+ }}
193
+ >
194
+ {children}
195
+ </ReviewLensProvider>
196
+ ```
197
+
198
+ Notification emails include a `reviewLensFeedback=<id>` link back to the selected feedback and state that they were sent by Review Lens on behalf of the signed-in user. The default Google adapter only requests the Gmail scope when `emailNotifications` is enabled.
199
+
200
+ The package also exports `ReviewLensLogo` for host apps that want to reuse the same mark in custom launchers or review entry points:
201
+
202
+ ```tsx
203
+ import { ReviewLensLogo } from "review-lens-react";
204
+ ```
205
+
171
206
  ### 4. Create an OAuth web client
172
207
 
173
208
  In Google Cloud Console:
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import "./styles.css";
2
2
  export { ReviewLensProvider, useReviewLens } from "./review-lens-provider";
3
3
  export { ReviewLensOverlay } from "./review-lens-overlay";
4
+ export { ReviewLensLogo } from "./review-lens-logo";
4
5
  export type { ReviewLensOverlayPlacement, ReviewLensViewportOption } from "./review-lens-overlay";
5
6
  export { createGoogleSheetsAdapter } from "./sheets/google-sheets-adapter";
6
7
  export { buildElementTarget } from "./selectors/build-element-target";
7
8
  export { normalizeReviewUrl } from "./url/normalize-review-url";
8
- export type { CssSnapshot, CreateAttachmentInput, CreateFeedbackInput, CreateMessageInput, ElementFingerprint, FeedbackCategory, FeedbackSeverity, FeedbackStatus, ReviewLensAttachment, ReviewLensAdapter, ReviewLensConfig, ReviewLensDesignTokens, ReviewLensFeedback, ReviewLensPermission, ReviewLensRole, ReviewLensTarget, ReviewLensThreadMessage, ReviewLensViewportPreset, UpdateFeedbackInput } from "./types";
9
+ export type { CssSnapshot, CreateAttachmentInput, CreateFeedbackInput, CreateMessageInput, ElementFingerprint, FeedbackCategory, FeedbackSeverity, FeedbackStatus, ReviewLensAttachment, ReviewLensAdapter, ReviewLensConfig, ReviewLensDesignTokens, ReviewLensEmailNotificationOptions, ReviewLensFeedback, ReviewLensPermission, ReviewLensRole, ReviewLensSendEmailInput, ReviewLensTarget, ReviewLensThreadMessage, ReviewLensViewportPreset, UpdateFeedbackInput } from "./types";
@@ -0,0 +1,6 @@
1
+ type ReviewLensLogoProps = {
2
+ className?: string;
3
+ title?: string;
4
+ };
5
+ export declare function ReviewLensLogo({ className, title }: ReviewLensLogoProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};