@popmelt.com/core 0.12.0 → 0.12.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/dist/index.d.mts CHANGED
@@ -8,6 +8,13 @@ type BridgeEvent = {
8
8
  timestamp: number;
9
9
  };
10
10
 
11
+ declare global {
12
+ interface Window {
13
+ __POPMELT_BRIDGE_URL__?: string;
14
+ __POPMELT_PROJECT_ID__?: string;
15
+ }
16
+ }
17
+
11
18
  type PopmeltContextValue = {
12
19
  isEnabled: boolean;
13
20
  };
@@ -32,6 +39,7 @@ declare const STICKER_FAMILIES: readonly ["padding", "margin", "border", "radius
32
39
  type StickerFamily = (typeof STICKER_FAMILIES)[number];
33
40
  declare const SPACING_STEPS: readonly [0, 1, 2, 3, 4, 6, 8, 10, 12, 16];
34
41
  declare const BORDER_STEPS: readonly [0, 1, 2, 4, 8];
42
+ declare const DIRECTION_STEPS: readonly ["vertical", "horizontal"];
35
43
  declare const ALIGN_STEPS: readonly ["stretch", "start", "center", "end", "baseline"];
36
44
  declare const JUSTIFY_STEPS: readonly ["start", "center", "end", "between", "around", "evenly"];
37
45
  declare const GRID_COUNT_STEPS: readonly [1, 2, 3, 4, 5, 6];
@@ -44,8 +52,8 @@ declare const SCALE_STEPS: readonly [0, 50, 75, 90, 95, 100, 105, 110, 125, 150]
44
52
  declare const ROTATE_STEPS: readonly [0, 1, 2, 3, 6, 12, 45, 90, 180];
45
53
  declare const OPACITY_STEPS: readonly [0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100];
46
54
  declare const MIX_BLEND_STEPS: readonly ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
47
- type StickerStep = (typeof SPACING_STEPS)[number] | (typeof BORDER_STEPS)[number] | (typeof ALIGN_STEPS)[number] | (typeof JUSTIFY_STEPS)[number] | (typeof GRID_COUNT_STEPS)[number] | (typeof FONT_SIZE_STEPS)[number] | (typeof FONT_WEIGHT_STEPS)[number] | (typeof LINE_HEIGHT_STEPS)[number] | (typeof LETTER_SPACING_STEPS)[number] | (typeof TEXT_ALIGN_STEPS)[number] | (typeof SCALE_STEPS)[number] | (typeof ROTATE_STEPS)[number] | (typeof OPACITY_STEPS)[number] | (typeof MIX_BLEND_STEPS)[number] | StickerColorStep;
48
- type StickerSubproperty = 'all' | 'x' | 'y' | 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left' | 'vertical' | 'horizontal' | 'gap' | 'align' | 'justify' | 'rows' | 'columns' | 'size' | 'weight' | 'line-height' | 'letter-spacing' | 'text-align' | 'color' | 'translate' | 'scale' | 'rotate' | 'opacity' | 'mix-blend' | StickerColorName;
55
+ type StickerStep = (typeof SPACING_STEPS)[number] | (typeof BORDER_STEPS)[number] | (typeof DIRECTION_STEPS)[number] | (typeof ALIGN_STEPS)[number] | (typeof JUSTIFY_STEPS)[number] | (typeof GRID_COUNT_STEPS)[number] | (typeof FONT_SIZE_STEPS)[number] | (typeof FONT_WEIGHT_STEPS)[number] | (typeof LINE_HEIGHT_STEPS)[number] | (typeof LETTER_SPACING_STEPS)[number] | (typeof TEXT_ALIGN_STEPS)[number] | (typeof SCALE_STEPS)[number] | (typeof ROTATE_STEPS)[number] | (typeof OPACITY_STEPS)[number] | (typeof MIX_BLEND_STEPS)[number] | StickerColorStep;
56
+ type StickerSubproperty = 'all' | 'x' | 'y' | 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left' | 'vertical' | 'horizontal' | 'direction' | 'gap' | 'align' | 'justify' | 'rows' | 'columns' | 'size' | 'weight' | 'line-height' | 'letter-spacing' | 'text-align' | 'color' | 'translate' | 'scale' | 'rotate' | 'opacity' | 'mix-blend' | StickerColorName;
49
57
 
50
58
  type AnnotationLifecycleStatus = 'pending' | 'sending' | 'in_flight' | 'resolved' | 'needs_review' | 'dismissed' | 'waiting_input' | 'failed';
51
59
  type ScopeBreadth = 'instance' | 'pattern';
@@ -54,9 +62,11 @@ type Scope = {
54
62
  breadth: ScopeBreadth;
55
63
  target: ScopeTarget;
56
64
  };
57
- declare const TOOL_TYPES: readonly ["freehand", "line", "rectangle", "circle", "inspector", "sticker", "hand", "model"];
65
+ declare const TOOL_TYPES: readonly ["inspector", "sticker", "model"];
58
66
  type ToolType = (typeof TOOL_TYPES)[number];
59
- type AnnotationType = ToolType | 'text';
67
+ declare const LEGACY_ANNOTATION_TYPES: readonly ["freehand", "line", "rectangle", "circle"];
68
+ type LegacyAnnotationType = (typeof LEGACY_ANNOTATION_TYPES)[number];
69
+ type AnnotationType = LegacyAnnotationType | 'text';
60
70
  type Point = {
61
71
  x: number;
62
72
  y: number;
@@ -97,6 +107,7 @@ type StyleModification = {
97
107
  durableSelector?: string;
98
108
  element: ElementInfo;
99
109
  changes: StyleChange[];
110
+ createdAt?: number;
100
111
  captured?: boolean;
101
112
  pathname?: string;
102
113
  };
@@ -107,6 +118,7 @@ type TextModification = {
107
118
  textNodePath: number[];
108
119
  original: string;
109
120
  modified: string;
121
+ createdAt?: number;
110
122
  captured?: boolean;
111
123
  pathname?: string;
112
124
  };