ui-sniper 3.1.0 → 3.2.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/dist/index.d.mts +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +1339 -1040
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1241 -943
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
interface PIIRedactionConfig {
|
|
@@ -62,6 +63,12 @@ type Annotation = {
|
|
|
62
63
|
height: number;
|
|
63
64
|
}>;
|
|
64
65
|
screenshotData?: string;
|
|
66
|
+
metrics?: {
|
|
67
|
+
renderDurationMs: number;
|
|
68
|
+
baseDurationMs: number;
|
|
69
|
+
};
|
|
70
|
+
a11yViolations?: any[];
|
|
71
|
+
domSnapshot?: any[];
|
|
65
72
|
kind?: "feedback" | "placement" | "rearrange";
|
|
66
73
|
placement?: {
|
|
67
74
|
componentType: string;
|
|
@@ -256,8 +263,10 @@ interface ReviewPanelProps {
|
|
|
256
263
|
onDelete?: (annotation: Annotation) => void;
|
|
257
264
|
/** Whether the panel is in dark or light mode */
|
|
258
265
|
isDarkMode?: boolean;
|
|
266
|
+
/** Called when user clicks copy on an annotation */
|
|
267
|
+
onCopy?: (annotation: Annotation) => void;
|
|
259
268
|
}
|
|
260
|
-
declare function ReviewPanel({ annotations, onClose, onJumpTo, onDelete, }: ReviewPanelProps): react_jsx_runtime.JSX.Element;
|
|
269
|
+
declare function ReviewPanel({ annotations, onClose, onJumpTo, onDelete, onCopy, }: ReviewPanelProps): react_jsx_runtime.JSX.Element;
|
|
261
270
|
|
|
262
271
|
interface AnnotationPopupCSSProps {
|
|
263
272
|
/** Element name to display in header */
|
|
@@ -465,4 +474,18 @@ declare function getStorageKey(pathname: string): string;
|
|
|
465
474
|
declare function loadAnnotations<T = Annotation>(pathname: string): T[];
|
|
466
475
|
declare function saveAnnotations<T = Annotation>(pathname: string, annotations: T[]): void;
|
|
467
476
|
|
|
468
|
-
|
|
477
|
+
declare global {
|
|
478
|
+
interface Window {
|
|
479
|
+
__uiSniperMetrics?: {
|
|
480
|
+
renderDurationMs: number;
|
|
481
|
+
baseDurationMs: number;
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
interface UISniperProfilerProps {
|
|
486
|
+
id?: string;
|
|
487
|
+
children: ReactNode;
|
|
488
|
+
}
|
|
489
|
+
declare function UISniperProfiler({ id, children }: UISniperProfilerProps): react_jsx_runtime.JSX.Element;
|
|
490
|
+
|
|
491
|
+
export { AnimatedBunny, type Annotation, AnnotationPopupCSS, type AnnotationPopupCSSHandle, type AnnotationPopupCSSProps, type DemoAnnotation, IconChatEllipsis, IconCheck, IconCheckSmall, IconCheckSmallAnimated, IconCheckmark, IconCheckmarkCircle, IconCheckmarkLarge, IconChevronLeft, IconChevronRight, IconClose, IconCopyAlt, IconCopyAnimated, IconEdit, IconEye, IconEyeAlt, IconEyeAnimated, IconEyeClosed, IconEyeMinus, IconGear, IconHelp, IconLayout, IconListSparkle, IconMoon, IconPause, IconPauseAlt, IconPausePlayAnimated, IconPlayAlt, IconPlus, IconSendAnimated, IconSendArrow, IconSun, IconTarget, IconTrash, IconTrashAlt, IconXmark, IconXmarkLarge, type PIIRedactionConfig, PageFeedbackToolbarCSS, ReviewPanel, type ReviewPanelProps, type TelemetryEvent, PageFeedbackToolbarCSS as UISniper, UISniperContext, type UISniperContextValue, UISniperProfiler, type UISniperProfilerProps, type UISniperProps, closestCrossingShadow, getElementClasses, getElementPath, getNearbyText, getShadowHost, getStorageKey, identifyAnimationElement, identifyElement, isInShadowDOM, loadAnnotations, saveAnnotations, useUISniper };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
interface PIIRedactionConfig {
|
|
@@ -62,6 +63,12 @@ type Annotation = {
|
|
|
62
63
|
height: number;
|
|
63
64
|
}>;
|
|
64
65
|
screenshotData?: string;
|
|
66
|
+
metrics?: {
|
|
67
|
+
renderDurationMs: number;
|
|
68
|
+
baseDurationMs: number;
|
|
69
|
+
};
|
|
70
|
+
a11yViolations?: any[];
|
|
71
|
+
domSnapshot?: any[];
|
|
65
72
|
kind?: "feedback" | "placement" | "rearrange";
|
|
66
73
|
placement?: {
|
|
67
74
|
componentType: string;
|
|
@@ -256,8 +263,10 @@ interface ReviewPanelProps {
|
|
|
256
263
|
onDelete?: (annotation: Annotation) => void;
|
|
257
264
|
/** Whether the panel is in dark or light mode */
|
|
258
265
|
isDarkMode?: boolean;
|
|
266
|
+
/** Called when user clicks copy on an annotation */
|
|
267
|
+
onCopy?: (annotation: Annotation) => void;
|
|
259
268
|
}
|
|
260
|
-
declare function ReviewPanel({ annotations, onClose, onJumpTo, onDelete, }: ReviewPanelProps): react_jsx_runtime.JSX.Element;
|
|
269
|
+
declare function ReviewPanel({ annotations, onClose, onJumpTo, onDelete, onCopy, }: ReviewPanelProps): react_jsx_runtime.JSX.Element;
|
|
261
270
|
|
|
262
271
|
interface AnnotationPopupCSSProps {
|
|
263
272
|
/** Element name to display in header */
|
|
@@ -465,4 +474,18 @@ declare function getStorageKey(pathname: string): string;
|
|
|
465
474
|
declare function loadAnnotations<T = Annotation>(pathname: string): T[];
|
|
466
475
|
declare function saveAnnotations<T = Annotation>(pathname: string, annotations: T[]): void;
|
|
467
476
|
|
|
468
|
-
|
|
477
|
+
declare global {
|
|
478
|
+
interface Window {
|
|
479
|
+
__uiSniperMetrics?: {
|
|
480
|
+
renderDurationMs: number;
|
|
481
|
+
baseDurationMs: number;
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
interface UISniperProfilerProps {
|
|
486
|
+
id?: string;
|
|
487
|
+
children: ReactNode;
|
|
488
|
+
}
|
|
489
|
+
declare function UISniperProfiler({ id, children }: UISniperProfilerProps): react_jsx_runtime.JSX.Element;
|
|
490
|
+
|
|
491
|
+
export { AnimatedBunny, type Annotation, AnnotationPopupCSS, type AnnotationPopupCSSHandle, type AnnotationPopupCSSProps, type DemoAnnotation, IconChatEllipsis, IconCheck, IconCheckSmall, IconCheckSmallAnimated, IconCheckmark, IconCheckmarkCircle, IconCheckmarkLarge, IconChevronLeft, IconChevronRight, IconClose, IconCopyAlt, IconCopyAnimated, IconEdit, IconEye, IconEyeAlt, IconEyeAnimated, IconEyeClosed, IconEyeMinus, IconGear, IconHelp, IconLayout, IconListSparkle, IconMoon, IconPause, IconPauseAlt, IconPausePlayAnimated, IconPlayAlt, IconPlus, IconSendAnimated, IconSendArrow, IconSun, IconTarget, IconTrash, IconTrashAlt, IconXmark, IconXmarkLarge, type PIIRedactionConfig, PageFeedbackToolbarCSS, ReviewPanel, type ReviewPanelProps, type TelemetryEvent, PageFeedbackToolbarCSS as UISniper, UISniperContext, type UISniperContextValue, UISniperProfiler, type UISniperProfilerProps, type UISniperProps, closestCrossingShadow, getElementClasses, getElementPath, getNearbyText, getShadowHost, getStorageKey, identifyAnimationElement, identifyElement, isInShadowDOM, loadAnnotations, saveAnnotations, useUISniper };
|