@popmelt.com/core 0.12.1 → 0.13.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/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/bridge-entry.mjs +63 -63
- package/dist/{chunk-CX27LJ36.mjs → chunk-36CNIZDC.mjs} +1 -1
- package/dist/cli.mjs +90 -90
- package/dist/index.d.mts +23 -6
- package/dist/index.mjs +154 -68
- package/dist/memory-store.d.mts +116 -116
- package/dist/memory-store.mjs +2 -2
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-next.d.mts +2 -5
- package/dist/plugin-next.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server-IKKLHSAM.mjs +210 -0
- package/dist/server.mjs +64 -64
- package/package.json +20 -25
- package/dist/server-Z3HBCU4F.mjs +0 -210
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
|
};
|
|
@@ -31,7 +38,9 @@ type StickerColorStep = (typeof STICKER_COLOR_STEPS)[number];
|
|
|
31
38
|
declare const STICKER_FAMILIES: readonly ["padding", "margin", "border", "radius", "stack", "grid", "text", "color", "transform", "opacity"];
|
|
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];
|
|
41
|
+
declare const TRANSLATE_STEPS: readonly [-16, -12, -10, -8, -6, -4, -3, -2, -1, 0, 1, 2, 3, 4, 6, 8, 10, 12, 16];
|
|
34
42
|
declare const BORDER_STEPS: readonly [0, 1, 2, 4, 8];
|
|
43
|
+
declare const DIRECTION_STEPS: readonly ["vertical", "horizontal"];
|
|
35
44
|
declare const ALIGN_STEPS: readonly ["stretch", "start", "center", "end", "baseline"];
|
|
36
45
|
declare const JUSTIFY_STEPS: readonly ["start", "center", "end", "between", "around", "evenly"];
|
|
37
46
|
declare const GRID_COUNT_STEPS: readonly [1, 2, 3, 4, 5, 6];
|
|
@@ -40,12 +49,12 @@ declare const FONT_WEIGHT_STEPS: readonly [300, 400, 500, 600, 700, 800];
|
|
|
40
49
|
declare const LINE_HEIGHT_STEPS: readonly ["none", "tight", "snug", "normal", "relaxed", "loose"];
|
|
41
50
|
declare const LETTER_SPACING_STEPS: readonly ["tighter", "tight", "normal", "wide", "wider", "widest"];
|
|
42
51
|
declare const TEXT_ALIGN_STEPS: readonly ["left", "center", "right", "justify"];
|
|
43
|
-
declare const SCALE_STEPS: readonly [
|
|
44
|
-
declare const ROTATE_STEPS: readonly [0, 1, 2, 3, 6, 12, 45, 90, 180];
|
|
52
|
+
declare const SCALE_STEPS: readonly [25, 50, 75, 90, 95, 100, 105, 110, 125, 150];
|
|
53
|
+
declare const ROTATE_STEPS: readonly [-180, -90, -45, -25, -12, -6, -3, -2, -1, 0, 1, 2, 3, 6, 12, 25, 45, 90, 180];
|
|
45
54
|
declare const OPACITY_STEPS: readonly [0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100];
|
|
46
55
|
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;
|
|
56
|
+
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 TRANSLATE_STEPS)[number] | (typeof SCALE_STEPS)[number] | (typeof ROTATE_STEPS)[number] | (typeof OPACITY_STEPS)[number] | (typeof MIX_BLEND_STEPS)[number] | StickerColorStep;
|
|
57
|
+
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
58
|
|
|
50
59
|
type AnnotationLifecycleStatus = 'pending' | 'sending' | 'in_flight' | 'resolved' | 'needs_review' | 'dismissed' | 'waiting_input' | 'failed';
|
|
51
60
|
type ScopeBreadth = 'instance' | 'pattern';
|
|
@@ -54,9 +63,11 @@ type Scope = {
|
|
|
54
63
|
breadth: ScopeBreadth;
|
|
55
64
|
target: ScopeTarget;
|
|
56
65
|
};
|
|
57
|
-
declare const TOOL_TYPES: readonly ["
|
|
66
|
+
declare const TOOL_TYPES: readonly ["inspector", "sticker", "model"];
|
|
58
67
|
type ToolType = (typeof TOOL_TYPES)[number];
|
|
59
|
-
|
|
68
|
+
declare const LEGACY_ANNOTATION_TYPES: readonly ["freehand", "line", "rectangle", "circle"];
|
|
69
|
+
type LegacyAnnotationType = (typeof LEGACY_ANNOTATION_TYPES)[number];
|
|
70
|
+
type AnnotationType = LegacyAnnotationType | 'text';
|
|
60
71
|
type Point = {
|
|
61
72
|
x: number;
|
|
62
73
|
y: number;
|
|
@@ -90,6 +101,10 @@ type StyleChange = {
|
|
|
90
101
|
family: StickerFamily;
|
|
91
102
|
subproperty: StickerSubproperty;
|
|
92
103
|
step: StickerStep;
|
|
104
|
+
axisSteps?: {
|
|
105
|
+
x: StickerStep;
|
|
106
|
+
y: StickerStep;
|
|
107
|
+
};
|
|
93
108
|
};
|
|
94
109
|
};
|
|
95
110
|
type StyleModification = {
|
|
@@ -97,6 +112,7 @@ type StyleModification = {
|
|
|
97
112
|
durableSelector?: string;
|
|
98
113
|
element: ElementInfo;
|
|
99
114
|
changes: StyleChange[];
|
|
115
|
+
createdAt?: number;
|
|
100
116
|
captured?: boolean;
|
|
101
117
|
pathname?: string;
|
|
102
118
|
};
|
|
@@ -107,6 +123,7 @@ type TextModification = {
|
|
|
107
123
|
textNodePath: number[];
|
|
108
124
|
original: string;
|
|
109
125
|
modified: string;
|
|
126
|
+
createdAt?: number;
|
|
110
127
|
captured?: boolean;
|
|
111
128
|
pathname?: string;
|
|
112
129
|
};
|