@popmelt.com/core 0.3.1 → 0.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 CHANGED
@@ -12,7 +12,13 @@ declare function PopmeltProvider({ children, enabled, bridgeUrl, }: PopmeltProvi
12
12
  declare function usePopmelt(): PopmeltContextValue;
13
13
 
14
14
  type AnnotationLifecycleStatus = 'pending' | 'in_flight' | 'resolved' | 'needs_review' | 'dismissed' | 'waiting_input';
15
- type ToolType = 'freehand' | 'line' | 'rectangle' | 'circle' | 'text' | 'inspector' | 'hand';
15
+ type ScopeBreadth = 'instance' | 'pattern';
16
+ type ScopeTarget = 'element' | 'component' | 'token';
17
+ type Scope = {
18
+ breadth: ScopeBreadth;
19
+ target: ScopeTarget;
20
+ };
21
+ type ToolType = 'freehand' | 'line' | 'rectangle' | 'circle' | 'text' | 'inspector' | 'hand' | 'model';
16
22
  type Point = {
17
23
  x: number;
18
24
  y: number;
@@ -39,6 +45,23 @@ type StyleModification = {
39
45
  changes: StyleChange[];
40
46
  captured?: boolean;
41
47
  };
48
+ type SpacingElementEvidence = {
49
+ selector: string;
50
+ reactComponent?: string;
51
+ className: string;
52
+ property: string;
53
+ matchedClass?: string;
54
+ suggestedClass?: string;
55
+ };
56
+ type SpacingTokenChange = {
57
+ id: string;
58
+ tokenPath: string;
59
+ tokenName: string;
60
+ originalPx: number;
61
+ newPx: number;
62
+ captured?: boolean;
63
+ affectedElements: SpacingElementEvidence[];
64
+ };
42
65
  type Annotation = {
43
66
  id: string;
44
67
  type: ToolType;
@@ -53,6 +76,7 @@ type Annotation = {
53
76
  status?: AnnotationLifecycleStatus;
54
77
  question?: string;
55
78
  resolutionSummary?: string;
79
+ scope?: Scope | null;
56
80
  replyCount?: number;
57
81
  threadId?: string;
58
82
  elements?: ElementInfo[];
@@ -106,6 +130,7 @@ type FeedbackData = {
106
130
  annotations: AnnotationData[];
107
131
  styleModifications: StyleModification[];
108
132
  inspectedElement?: ElementInfo;
133
+ spacingTokenChanges?: SpacingTokenChange[];
109
134
  };
110
135
 
111
136
  export { type Annotation, type BridgeEvent, type BridgeStatus, type ClaudeResponse, type ElementInfo, type FeedbackData, type Point, PopmeltProvider, type StyleChange, type StyleModification, type ToolType, usePopmelt };