@popmelt.com/core 0.18.0 → 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 +99 -0
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/adapter-react-three-fiber.d.mts +36 -0
- package/dist/adapter-react-three-fiber.mjs +2 -0
- package/dist/adapter-three.d.mts +2 -0
- package/dist/adapter-three.mjs +1 -1
- package/dist/bridge-entry.mjs +54 -54
- package/dist/chunk-J3UIBBU2.mjs +2 -0
- package/dist/{chunk-RS3XXK26.mjs → chunk-RH6W4F2W.mjs} +1 -1
- package/dist/{chunk-GQOEG3E5.mjs → chunk-UC34UP4S.mjs} +1 -1
- package/dist/cli.mjs +74 -74
- package/dist/index.d.mts +36 -8
- package/dist/index.mjs +40 -40
- package/dist/media.d.mts +3 -2
- package/dist/media.mjs +1 -1
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/{server-MUVH7FWR.mjs → server-PV5AVWEM.mjs} +56 -56
- package/dist/server.d.mts +2 -2
- package/dist/server.mjs +56 -56
- package/dist/{video-adapter-DzNtG67g.d.mts → subjects-CeqtFged.d.mts} +1 -337
- package/dist/video-adapter-Gq8saCDn.d.mts +339 -0
- package/package.json +14 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
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
|
+
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
|
+
import { I as ImageRecognitionProvider, V as VideoTrackingProvider, a as ImageSubjectAdapterOptions, b as VideoSubjectAdapterOptions } from './video-adapter-Gq8saCDn.mjs';
|
|
5
6
|
|
|
6
7
|
/** Client-side envelope used for persisted and streaming bridge events. */
|
|
7
8
|
type BridgeEvent = {
|
|
@@ -10,6 +11,28 @@ type BridgeEvent = {
|
|
|
10
11
|
timestamp: number;
|
|
11
12
|
};
|
|
12
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
|
+
|
|
13
36
|
type PopmeltExtensionRuntime = {
|
|
14
37
|
/** Optional perception contribution for Core's built-in image adapter. */
|
|
15
38
|
imageRecognition?: ImageRecognitionProvider;
|
|
@@ -33,6 +56,12 @@ type ImageAnnotationOptions = Omit<ImageSubjectAdapterOptions, 'id'>;
|
|
|
33
56
|
|
|
34
57
|
type VideoAnnotationOptions = Omit<VideoSubjectAdapterOptions, 'id'>;
|
|
35
58
|
|
|
59
|
+
type PopmeltContextValue = {
|
|
60
|
+
isEnabled: boolean;
|
|
61
|
+
registerSubjectAdapter(adapter: PopmeltSubjectAdapter): () => void;
|
|
62
|
+
};
|
|
63
|
+
declare function usePopmelt(): PopmeltContextValue;
|
|
64
|
+
|
|
36
65
|
declare global {
|
|
37
66
|
interface Window {
|
|
38
67
|
__POPMELT_BRIDGE_URL__?: string;
|
|
@@ -40,9 +69,6 @@ declare global {
|
|
|
40
69
|
}
|
|
41
70
|
}
|
|
42
71
|
|
|
43
|
-
type PopmeltContextValue = {
|
|
44
|
-
isEnabled: boolean;
|
|
45
|
-
};
|
|
46
72
|
type PopmeltProviderProps = PropsWithChildren<{
|
|
47
73
|
enabled?: boolean;
|
|
48
74
|
bridgeUrl?: string;
|
|
@@ -59,9 +85,10 @@ type PopmeltProviderProps = PropsWithChildren<{
|
|
|
59
85
|
imageAnnotation?: boolean | ImageAnnotationOptions;
|
|
60
86
|
/** Manual video annotation is on by default; See may contribute tracking. */
|
|
61
87
|
videoAnnotation?: boolean | VideoAnnotationOptions;
|
|
88
|
+
/** Capture application-owned JSON context with each submitted human turn. */
|
|
89
|
+
getCommentMeta?: GetCommentMeta;
|
|
62
90
|
}>;
|
|
63
|
-
declare function PopmeltProvider({ children, enabled, bridgeUrl, projectId: projectIdProp, navigate: navigateProp, subjectAdapters, extensions, imageAnnotation, videoAnnotation, }: PopmeltProviderProps): react.JSX.Element;
|
|
64
|
-
declare function usePopmelt(): PopmeltContextValue;
|
|
91
|
+
declare function PopmeltProvider({ children, enabled, bridgeUrl, projectId: projectIdProp, navigate: navigateProp, subjectAdapters, extensions, imageAnnotation, videoAnnotation, getCommentMeta, }: PopmeltProviderProps): react.JSX.Element;
|
|
65
92
|
|
|
66
93
|
type AnnotationData = {
|
|
67
94
|
id: string;
|
|
@@ -93,6 +120,7 @@ type FeedbackData = {
|
|
|
93
120
|
domModifications?: DomModification[];
|
|
94
121
|
inspectedElement?: ElementInfo;
|
|
95
122
|
spacingTokenChanges?: SpacingTokenChange[];
|
|
123
|
+
meta?: CommentMeta;
|
|
96
124
|
};
|
|
97
125
|
|
|
98
|
-
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 };
|