@popmelt.com/core 0.17.0 → 0.18.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.
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 { I as ImageRecognitionProvider, V as VideoTrackingProvider, P as PopmeltSubjectAdapter, a as ImageSubjectAdapterOptions, b as VideoSubjectAdapterOptions, A as Annotation, E as ElementInfo, c as AnnotationAttachment, S as SubjectFeedbackAttachment, d as StyleModification, T as TextModification, D as DomModification, e as SpacingTokenChange } from './video-adapter-cDwq4uNP.mjs';
4
- export { f as AnnotationType, B as BridgeStatus, C as ClaudeResponse, g as ImageObjectContext, O as OpaqueTargetReference, h as Point, i as PopmeltSubject, j as PopmeltSubjectBounds, k as PopmeltSubjectCreationSession, l as PopmeltSubjectTrackingAnchor, m as PopmeltSurfaceSnapshot, R as ReactSourceLocation, n as StyleChange, o as ToolType, p as VideoObjectContext } from './video-adapter-cDwq4uNP.mjs';
3
+ import { P as PopmeltSubjectAdapter, A as Annotation, 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 = {
@@ -33,6 +34,12 @@ type ImageAnnotationOptions = Omit<ImageSubjectAdapterOptions, 'id'>;
33
34
 
34
35
  type VideoAnnotationOptions = Omit<VideoSubjectAdapterOptions, 'id'>;
35
36
 
37
+ type PopmeltContextValue = {
38
+ isEnabled: boolean;
39
+ registerSubjectAdapter(adapter: PopmeltSubjectAdapter): () => void;
40
+ };
41
+ declare function usePopmelt(): PopmeltContextValue;
42
+
36
43
  declare global {
37
44
  interface Window {
38
45
  __POPMELT_BRIDGE_URL__?: string;
@@ -40,9 +47,6 @@ declare global {
40
47
  }
41
48
  }
42
49
 
43
- type PopmeltContextValue = {
44
- isEnabled: boolean;
45
- };
46
50
  type PopmeltProviderProps = PropsWithChildren<{
47
51
  enabled?: boolean;
48
52
  bridgeUrl?: string;
@@ -61,7 +65,6 @@ type PopmeltProviderProps = PropsWithChildren<{
61
65
  videoAnnotation?: boolean | VideoAnnotationOptions;
62
66
  }>;
63
67
  declare function PopmeltProvider({ children, enabled, bridgeUrl, projectId: projectIdProp, navigate: navigateProp, subjectAdapters, extensions, imageAnnotation, videoAnnotation, }: PopmeltProviderProps): react.JSX.Element;
64
- declare function usePopmelt(): PopmeltContextValue;
65
68
 
66
69
  type AnnotationData = {
67
70
  id: string;
@@ -74,6 +77,7 @@ type AnnotationData = {
74
77
  imageCount?: number;
75
78
  attachments?: AnnotationAttachment[];
76
79
  subjectFeedback?: SubjectFeedbackAttachment;
80
+ interactionEpisode?: Annotation['interactionEpisode'];
77
81
  };
78
82
  type FeedbackData = {
79
83
  timestamp: string;