@popmelt.com/core 0.18.1 → 0.18.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 +34 -0
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/bridge-entry.mjs +54 -54
- package/dist/{chunk-RS3XXK26.mjs → chunk-RH6W4F2W.mjs} +1 -1
- package/dist/{chunk-P2Y3NJ7A.mjs → chunk-UC34UP4S.mjs} +1 -1
- package/dist/cli.mjs +74 -74
- package/dist/index.d.mts +28 -3
- package/dist/index.mjs +40 -40
- package/dist/media.mjs +1 -1
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/{server-VX66FOQO.mjs → server-PV5AVWEM.mjs} +56 -56
- package/dist/server.d.mts +2 -2
- package/dist/server.mjs +56 -56
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { A as Annotation, P as PopmeltSubjectAdapter, E as ElementInfo, a as AnnotationAttachment, S as SubjectFeedbackAttachment, b as StyleModification, T as TextModification, D as DomModification, c as SpacingTokenChange } from './subjects-CeqtFged.mjs';
|
|
4
4
|
export { d as AnnotationType, B as BridgeStatus, C as ClaudeResponse, I as ImageObjectContext, O as OpaqueTargetReference, e as Point, f as PopmeltSubject, g as PopmeltSubjectBounds, h as PopmeltSubjectCreationSession, i as PopmeltSubjectTrackingAnchor, j as PopmeltSurfaceSnapshot, R as ReactSourceLocation, k as StyleChange, l as ToolType, V as VideoObjectContext } from './subjects-CeqtFged.mjs';
|
|
5
5
|
import { I as ImageRecognitionProvider, V as VideoTrackingProvider, a as ImageSubjectAdapterOptions, b as VideoSubjectAdapterOptions } from './video-adapter-Gq8saCDn.mjs';
|
|
6
6
|
|
|
@@ -11,6 +11,28 @@ type BridgeEvent = {
|
|
|
11
11
|
timestamp: number;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
type CommentMetaValue = null | boolean | number | string | CommentMetaValue[] | {
|
|
15
|
+
[key: string]: CommentMetaValue;
|
|
16
|
+
};
|
|
17
|
+
/** User-owned, JSON-serializable context captured with a human comment turn. */
|
|
18
|
+
type CommentMeta = Record<string, CommentMetaValue>;
|
|
19
|
+
type CommentMetaContext = {
|
|
20
|
+
kind: 'annotation';
|
|
21
|
+
timestamp: number;
|
|
22
|
+
url: string;
|
|
23
|
+
pathname: string;
|
|
24
|
+
annotations: readonly Readonly<Annotation>[];
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'reply';
|
|
27
|
+
timestamp: number;
|
|
28
|
+
url: string;
|
|
29
|
+
pathname: string;
|
|
30
|
+
threadId: string;
|
|
31
|
+
reply: string;
|
|
32
|
+
annotations: readonly Readonly<Annotation>[];
|
|
33
|
+
};
|
|
34
|
+
type GetCommentMeta = (context: CommentMetaContext) => CommentMeta | undefined | Promise<CommentMeta | undefined>;
|
|
35
|
+
|
|
14
36
|
type PopmeltExtensionRuntime = {
|
|
15
37
|
/** Optional perception contribution for Core's built-in image adapter. */
|
|
16
38
|
imageRecognition?: ImageRecognitionProvider;
|
|
@@ -63,8 +85,10 @@ type PopmeltProviderProps = PropsWithChildren<{
|
|
|
63
85
|
imageAnnotation?: boolean | ImageAnnotationOptions;
|
|
64
86
|
/** Manual video annotation is on by default; See may contribute tracking. */
|
|
65
87
|
videoAnnotation?: boolean | VideoAnnotationOptions;
|
|
88
|
+
/** Capture application-owned JSON context with each submitted human turn. */
|
|
89
|
+
getCommentMeta?: GetCommentMeta;
|
|
66
90
|
}>;
|
|
67
|
-
declare function PopmeltProvider({ children, enabled, bridgeUrl, projectId: projectIdProp, navigate: navigateProp, subjectAdapters, extensions, imageAnnotation, videoAnnotation, }: PopmeltProviderProps): react.JSX.Element;
|
|
91
|
+
declare function PopmeltProvider({ children, enabled, bridgeUrl, projectId: projectIdProp, navigate: navigateProp, subjectAdapters, extensions, imageAnnotation, videoAnnotation, getCommentMeta, }: PopmeltProviderProps): react.JSX.Element;
|
|
68
92
|
|
|
69
93
|
type AnnotationData = {
|
|
70
94
|
id: string;
|
|
@@ -96,6 +120,7 @@ type FeedbackData = {
|
|
|
96
120
|
domModifications?: DomModification[];
|
|
97
121
|
inspectedElement?: ElementInfo;
|
|
98
122
|
spacingTokenChanges?: SpacingTokenChange[];
|
|
123
|
+
meta?: CommentMeta;
|
|
99
124
|
};
|
|
100
125
|
|
|
101
|
-
export { Annotation, type BridgeEvent, ElementInfo, type FeedbackData, type ImageAnnotationOptions, type PopmeltExtension, type PopmeltExtensionRuntime, PopmeltProvider, type PopmeltProviderProps, PopmeltSubjectAdapter, StyleModification, type VideoAnnotationOptions, usePopmelt };
|
|
126
|
+
export { Annotation, type BridgeEvent, type CommentMeta, type CommentMetaContext, type CommentMetaValue, ElementInfo, type FeedbackData, type GetCommentMeta, type ImageAnnotationOptions, type PopmeltExtension, type PopmeltExtensionRuntime, PopmeltProvider, type PopmeltProviderProps, PopmeltSubjectAdapter, StyleModification, type VideoAnnotationOptions, usePopmelt };
|