@critique.work/agentation 2.2.2 → 2.4.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 +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +1514 -848
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1513 -848
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -12
package/dist/index.d.mts
CHANGED
|
@@ -33,6 +33,9 @@ type Annotation = {
|
|
|
33
33
|
}>;
|
|
34
34
|
drawingIndex?: number;
|
|
35
35
|
strokeId?: string;
|
|
36
|
+
lineText?: string;
|
|
37
|
+
contextBefore?: string[];
|
|
38
|
+
contextAfter?: string[];
|
|
36
39
|
sessionId?: string;
|
|
37
40
|
url?: string;
|
|
38
41
|
intent?: AnnotationIntent;
|
|
@@ -273,6 +276,21 @@ declare function identifyElement(target: HTMLElement): {
|
|
|
273
276
|
* Gets text content from element and siblings for context
|
|
274
277
|
*/
|
|
275
278
|
declare function getNearbyText(element: HTMLElement): string;
|
|
279
|
+
/**
|
|
280
|
+
* Surrounding context from sibling nodes in a repeated structure.
|
|
281
|
+
* Walks up the DOM to find the nearest ancestor that is one of many
|
|
282
|
+
* siblings (e.g. lines in a diff, rows in a table, items in a list),
|
|
283
|
+
* then collects text from N siblings before and after.
|
|
284
|
+
*/
|
|
285
|
+
interface SurroundingContext {
|
|
286
|
+
/** Text of the node the annotation is on */
|
|
287
|
+
lineText: string;
|
|
288
|
+
/** Text of preceding sibling nodes (oldest first) */
|
|
289
|
+
contextBefore: string[];
|
|
290
|
+
/** Text of following sibling nodes (closest first) */
|
|
291
|
+
contextAfter: string[];
|
|
292
|
+
}
|
|
293
|
+
declare function getSurroundingNodes(element: HTMLElement, radius?: number): SurroundingContext | null;
|
|
276
294
|
/**
|
|
277
295
|
* Simplified element identifier for animation feedback (less verbose)
|
|
278
296
|
*/
|
|
@@ -286,4 +304,4 @@ declare function getStorageKey(pathname: string): string;
|
|
|
286
304
|
declare function loadAnnotations<T = Annotation>(pathname: string): T[];
|
|
287
305
|
declare function saveAnnotations<T = Annotation>(pathname: string, annotations: T[]): void;
|
|
288
306
|
|
|
289
|
-
export { PageFeedbackToolbarCSS as Agentation, type AgentationProps, 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, IconListSparkle, IconMoon, IconPause, IconPauseAlt, IconPausePlayAnimated, IconPencil, IconPlayAlt, IconPlus, IconSendAnimated, IconSendArrow, IconSun, IconTrash, IconTrashAlt, IconXmark, IconXmarkLarge, PageFeedbackToolbarCSS, closestCrossingShadow, getElementClasses, getElementPath, getNearbyText, getShadowHost, getStorageKey, identifyAnimationElement, identifyElement, isInShadowDOM, loadAnnotations, saveAnnotations };
|
|
307
|
+
export { PageFeedbackToolbarCSS as Agentation, type AgentationProps, 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, IconListSparkle, IconMoon, IconPause, IconPauseAlt, IconPausePlayAnimated, IconPencil, IconPlayAlt, IconPlus, IconSendAnimated, IconSendArrow, IconSun, IconTrash, IconTrashAlt, IconXmark, IconXmarkLarge, PageFeedbackToolbarCSS, type SurroundingContext, closestCrossingShadow, getElementClasses, getElementPath, getNearbyText, getShadowHost, getStorageKey, getSurroundingNodes, identifyAnimationElement, identifyElement, isInShadowDOM, loadAnnotations, saveAnnotations };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ type Annotation = {
|
|
|
33
33
|
}>;
|
|
34
34
|
drawingIndex?: number;
|
|
35
35
|
strokeId?: string;
|
|
36
|
+
lineText?: string;
|
|
37
|
+
contextBefore?: string[];
|
|
38
|
+
contextAfter?: string[];
|
|
36
39
|
sessionId?: string;
|
|
37
40
|
url?: string;
|
|
38
41
|
intent?: AnnotationIntent;
|
|
@@ -273,6 +276,21 @@ declare function identifyElement(target: HTMLElement): {
|
|
|
273
276
|
* Gets text content from element and siblings for context
|
|
274
277
|
*/
|
|
275
278
|
declare function getNearbyText(element: HTMLElement): string;
|
|
279
|
+
/**
|
|
280
|
+
* Surrounding context from sibling nodes in a repeated structure.
|
|
281
|
+
* Walks up the DOM to find the nearest ancestor that is one of many
|
|
282
|
+
* siblings (e.g. lines in a diff, rows in a table, items in a list),
|
|
283
|
+
* then collects text from N siblings before and after.
|
|
284
|
+
*/
|
|
285
|
+
interface SurroundingContext {
|
|
286
|
+
/** Text of the node the annotation is on */
|
|
287
|
+
lineText: string;
|
|
288
|
+
/** Text of preceding sibling nodes (oldest first) */
|
|
289
|
+
contextBefore: string[];
|
|
290
|
+
/** Text of following sibling nodes (closest first) */
|
|
291
|
+
contextAfter: string[];
|
|
292
|
+
}
|
|
293
|
+
declare function getSurroundingNodes(element: HTMLElement, radius?: number): SurroundingContext | null;
|
|
276
294
|
/**
|
|
277
295
|
* Simplified element identifier for animation feedback (less verbose)
|
|
278
296
|
*/
|
|
@@ -286,4 +304,4 @@ declare function getStorageKey(pathname: string): string;
|
|
|
286
304
|
declare function loadAnnotations<T = Annotation>(pathname: string): T[];
|
|
287
305
|
declare function saveAnnotations<T = Annotation>(pathname: string, annotations: T[]): void;
|
|
288
306
|
|
|
289
|
-
export { PageFeedbackToolbarCSS as Agentation, type AgentationProps, 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, IconListSparkle, IconMoon, IconPause, IconPauseAlt, IconPausePlayAnimated, IconPencil, IconPlayAlt, IconPlus, IconSendAnimated, IconSendArrow, IconSun, IconTrash, IconTrashAlt, IconXmark, IconXmarkLarge, PageFeedbackToolbarCSS, closestCrossingShadow, getElementClasses, getElementPath, getNearbyText, getShadowHost, getStorageKey, identifyAnimationElement, identifyElement, isInShadowDOM, loadAnnotations, saveAnnotations };
|
|
307
|
+
export { PageFeedbackToolbarCSS as Agentation, type AgentationProps, 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, IconListSparkle, IconMoon, IconPause, IconPauseAlt, IconPausePlayAnimated, IconPencil, IconPlayAlt, IconPlus, IconSendAnimated, IconSendArrow, IconSun, IconTrash, IconTrashAlt, IconXmark, IconXmarkLarge, PageFeedbackToolbarCSS, type SurroundingContext, closestCrossingShadow, getElementClasses, getElementPath, getNearbyText, getShadowHost, getStorageKey, getSurroundingNodes, identifyAnimationElement, identifyElement, isInShadowDOM, loadAnnotations, saveAnnotations };
|