agentation 0.0.1
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.
Potentially problematic release.
This version of agentation might be problematic. Click here for more details.
- package/README.md +169 -0
- package/dist/index.cjs +2290 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +183 -0
- package/dist/index.d.ts +183 -0
- package/dist/index.js +2243 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare function PageFeedbackToolbar(): react.ReactPortal | null;
|
|
5
|
+
|
|
6
|
+
declare function PageFeedbackToolbarCSS(): react.ReactPortal | null;
|
|
7
|
+
|
|
8
|
+
interface AnnotationPopupProps$1 {
|
|
9
|
+
/** Element name to display in header */
|
|
10
|
+
element: string;
|
|
11
|
+
/** Optional timestamp display (e.g., "@ 1.23s" for animation feedback) */
|
|
12
|
+
timestamp?: string;
|
|
13
|
+
/** Optional selected/highlighted text */
|
|
14
|
+
selectedText?: string;
|
|
15
|
+
/** Placeholder text for the textarea */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Called when annotation is submitted with text */
|
|
18
|
+
onSubmit: (text: string) => void;
|
|
19
|
+
/** Called when popup is cancelled/dismissed */
|
|
20
|
+
onCancel: () => void;
|
|
21
|
+
/** Position styles (left, top) */
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
/** Color variant for submit button */
|
|
24
|
+
variant?: "blue" | "green";
|
|
25
|
+
}
|
|
26
|
+
interface AnnotationPopupHandle$1 {
|
|
27
|
+
/** Shake the popup (e.g., when user clicks outside) */
|
|
28
|
+
shake: () => void;
|
|
29
|
+
}
|
|
30
|
+
declare const AnnotationPopup: react.ForwardRefExoticComponent<AnnotationPopupProps$1 & react.RefAttributes<AnnotationPopupHandle$1>>;
|
|
31
|
+
declare function AnnotationPopupPresence({ isOpen, ...props }: AnnotationPopupProps$1 & {
|
|
32
|
+
isOpen: boolean;
|
|
33
|
+
}): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
interface AnnotationPopupProps {
|
|
36
|
+
element: string;
|
|
37
|
+
timestamp?: string;
|
|
38
|
+
selectedText?: string;
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
onSubmit: (text: string) => void;
|
|
41
|
+
onCancel: () => void;
|
|
42
|
+
style?: React.CSSProperties;
|
|
43
|
+
variant?: "blue" | "green";
|
|
44
|
+
}
|
|
45
|
+
interface AnnotationPopupHandle {
|
|
46
|
+
shake: () => void;
|
|
47
|
+
}
|
|
48
|
+
declare const AnnotationPopupCSS: react.ForwardRefExoticComponent<AnnotationPopupProps & react.RefAttributes<AnnotationPopupHandle>>;
|
|
49
|
+
|
|
50
|
+
declare const IconFeedback$1: ({ size }: {
|
|
51
|
+
size?: number;
|
|
52
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare const IconPlay$1: ({ size }: {
|
|
54
|
+
size?: number;
|
|
55
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
56
|
+
declare const IconPause$1: ({ size }: {
|
|
57
|
+
size?: number;
|
|
58
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
59
|
+
declare const EyeMorphIcon$1: ({ size, visible }: {
|
|
60
|
+
size?: number;
|
|
61
|
+
visible: boolean;
|
|
62
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
63
|
+
declare const CopyMorphIcon$1: ({ size, checked }: {
|
|
64
|
+
size?: number;
|
|
65
|
+
checked: boolean;
|
|
66
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare const TrashMorphIcon$1: ({ size, checked }: {
|
|
68
|
+
size?: number;
|
|
69
|
+
checked: boolean;
|
|
70
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
declare const IconExternal$1: ({ size }: {
|
|
72
|
+
size?: number;
|
|
73
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
74
|
+
declare const IconChevronDown$1: ({ size }: {
|
|
75
|
+
size?: number;
|
|
76
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
77
|
+
declare const IconClose$1: ({ size }: {
|
|
78
|
+
size?: number;
|
|
79
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
80
|
+
declare const IconPlus$1: ({ size }: {
|
|
81
|
+
size?: number;
|
|
82
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
83
|
+
|
|
84
|
+
declare const IconFeedback: ({ size }: {
|
|
85
|
+
size?: number;
|
|
86
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
87
|
+
declare const IconPlay: ({ size }: {
|
|
88
|
+
size?: number;
|
|
89
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
90
|
+
declare const IconPause: ({ size }: {
|
|
91
|
+
size?: number;
|
|
92
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
declare const EyeMorphIcon: ({ size, visible }: {
|
|
94
|
+
size?: number;
|
|
95
|
+
visible: boolean;
|
|
96
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
97
|
+
declare const CopyMorphIcon: ({ size, checked }: {
|
|
98
|
+
size?: number;
|
|
99
|
+
checked: boolean;
|
|
100
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare const TrashMorphIcon: ({ size, checked }: {
|
|
102
|
+
size?: number;
|
|
103
|
+
checked: boolean;
|
|
104
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
105
|
+
declare const IconExternal: ({ size }: {
|
|
106
|
+
size?: number;
|
|
107
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
108
|
+
declare const IconChevronDown: ({ size }: {
|
|
109
|
+
size?: number;
|
|
110
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare const IconClose: ({ size }: {
|
|
112
|
+
size?: number;
|
|
113
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
114
|
+
declare const IconPlus: ({ size }: {
|
|
115
|
+
size?: number;
|
|
116
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
|
|
118
|
+
declare const iconsCss_CopyMorphIcon: typeof CopyMorphIcon;
|
|
119
|
+
declare const iconsCss_EyeMorphIcon: typeof EyeMorphIcon;
|
|
120
|
+
declare const iconsCss_IconChevronDown: typeof IconChevronDown;
|
|
121
|
+
declare const iconsCss_IconClose: typeof IconClose;
|
|
122
|
+
declare const iconsCss_IconExternal: typeof IconExternal;
|
|
123
|
+
declare const iconsCss_IconFeedback: typeof IconFeedback;
|
|
124
|
+
declare const iconsCss_IconPause: typeof IconPause;
|
|
125
|
+
declare const iconsCss_IconPlay: typeof IconPlay;
|
|
126
|
+
declare const iconsCss_IconPlus: typeof IconPlus;
|
|
127
|
+
declare const iconsCss_TrashMorphIcon: typeof TrashMorphIcon;
|
|
128
|
+
declare namespace iconsCss {
|
|
129
|
+
export { iconsCss_CopyMorphIcon as CopyMorphIcon, iconsCss_EyeMorphIcon as EyeMorphIcon, iconsCss_IconChevronDown as IconChevronDown, iconsCss_IconClose as IconClose, iconsCss_IconExternal as IconExternal, iconsCss_IconFeedback as IconFeedback, iconsCss_IconPause as IconPause, iconsCss_IconPlay as IconPlay, iconsCss_IconPlus as IconPlus, iconsCss_TrashMorphIcon as TrashMorphIcon };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Gets a readable path for an element (e.g., "article > section > p")
|
|
134
|
+
*/
|
|
135
|
+
declare function getElementPath(target: HTMLElement, maxDepth?: number): string;
|
|
136
|
+
/**
|
|
137
|
+
* Identifies an element and returns a human-readable name + path
|
|
138
|
+
*/
|
|
139
|
+
declare function identifyElement(target: HTMLElement): {
|
|
140
|
+
name: string;
|
|
141
|
+
path: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Gets text content from element and siblings for context
|
|
145
|
+
*/
|
|
146
|
+
declare function getNearbyText(element: HTMLElement): string;
|
|
147
|
+
/**
|
|
148
|
+
* Simplified element identifier for animation feedback (less verbose)
|
|
149
|
+
*/
|
|
150
|
+
declare function identifyAnimationElement(target: HTMLElement): string;
|
|
151
|
+
/**
|
|
152
|
+
* Gets CSS class names from an element (cleaned of module hashes)
|
|
153
|
+
*/
|
|
154
|
+
declare function getElementClasses(target: HTMLElement): string;
|
|
155
|
+
|
|
156
|
+
type Annotation = {
|
|
157
|
+
id: string;
|
|
158
|
+
x: number;
|
|
159
|
+
y: number;
|
|
160
|
+
comment: string;
|
|
161
|
+
element: string;
|
|
162
|
+
elementPath: string;
|
|
163
|
+
timestamp: number;
|
|
164
|
+
selectedText?: string;
|
|
165
|
+
boundingBox?: {
|
|
166
|
+
x: number;
|
|
167
|
+
y: number;
|
|
168
|
+
width: number;
|
|
169
|
+
height: number;
|
|
170
|
+
};
|
|
171
|
+
nearbyText?: string;
|
|
172
|
+
cssClasses?: string;
|
|
173
|
+
nearbyElements?: string;
|
|
174
|
+
computedStyles?: string;
|
|
175
|
+
fullPath?: string;
|
|
176
|
+
accessibility?: string;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
declare function getStorageKey(pathname: string): string;
|
|
180
|
+
declare function loadAnnotations<T = Annotation>(pathname: string): T[];
|
|
181
|
+
declare function saveAnnotations<T = Annotation>(pathname: string, annotations: T[]): void;
|
|
182
|
+
|
|
183
|
+
export { PageFeedbackToolbar as Agentation, PageFeedbackToolbarCSS as AgentationCSS, type Annotation, AnnotationPopup, AnnotationPopupCSS, type AnnotationPopupHandle$1 as AnnotationPopupHandle, AnnotationPopupPresence, type AnnotationPopupProps$1 as AnnotationPopupProps, CopyMorphIcon$1 as CopyMorphIcon, EyeMorphIcon$1 as EyeMorphIcon, PageFeedbackToolbar as FeedbackToolbar, IconChevronDown$1 as IconChevronDown, IconClose$1 as IconClose, IconExternal$1 as IconExternal, IconFeedback$1 as IconFeedback, IconPause$1 as IconPause, IconPlay$1 as IconPlay, IconPlus$1 as IconPlus, iconsCss as IconsCSS, PageFeedbackToolbar, PageFeedbackToolbarCSS, TrashMorphIcon$1 as TrashMorphIcon, getElementClasses, getElementPath, getNearbyText, getStorageKey, identifyAnimationElement, identifyElement, loadAnnotations, saveAnnotations };
|