mesurer 0.2.4 → 0.2.5
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/CHANGELOG.md +6 -0
- package/dist/{chunk-DBVWPZ7G.js → chunk-BFNKUAED.js} +1 -1
- package/dist/index.cjs +16651 -16164
- package/dist/index.d.cts +26 -14
- package/dist/index.d.ts +26 -14
- package/dist/index.js +16681 -16186
- package/dist/{screen-recording-gif-J4EOWLWH.js → screen-recording-gif-WG5J6DEP.js} +1 -8
- package/dist/styles.css +1 -1
- package/package.json +12 -11
package/dist/index.d.cts
CHANGED
|
@@ -8,22 +8,22 @@ type ColorSample = {
|
|
|
8
8
|
alpha: number;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
type Point = {
|
|
11
|
+
type Point$1 = {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
14
14
|
};
|
|
15
15
|
type Arrow = {
|
|
16
16
|
id: string;
|
|
17
|
-
start: Point;
|
|
18
|
-
end: Point;
|
|
19
|
-
control?: Point;
|
|
17
|
+
start: Point$1;
|
|
18
|
+
end: Point$1;
|
|
19
|
+
control?: Point$1;
|
|
20
20
|
color: string;
|
|
21
21
|
width: number;
|
|
22
22
|
rotation?: number;
|
|
23
23
|
};
|
|
24
24
|
type PenStroke = {
|
|
25
25
|
id: string;
|
|
26
|
-
points: Point[];
|
|
26
|
+
points: Point$1[];
|
|
27
27
|
color: string;
|
|
28
28
|
width: number;
|
|
29
29
|
rotation?: number;
|
|
@@ -54,8 +54,8 @@ type CommentTarget = {
|
|
|
54
54
|
attributes: Record<string, string>;
|
|
55
55
|
styles: string;
|
|
56
56
|
rect: Rect;
|
|
57
|
-
documentPoint: Point;
|
|
58
|
-
anchor?: Point;
|
|
57
|
+
documentPoint: Point$1;
|
|
58
|
+
anchor?: Point$1;
|
|
59
59
|
};
|
|
60
60
|
type CommentThread = {
|
|
61
61
|
id: string;
|
|
@@ -103,8 +103,8 @@ type DistanceOverlay = {
|
|
|
103
103
|
elementRefB?: Element | null;
|
|
104
104
|
pinTargetRef?: Element | null;
|
|
105
105
|
pinTargetRect?: Rect | null;
|
|
106
|
-
pinCursor?: Point | null;
|
|
107
|
-
pinCursorOffset?: Point | null;
|
|
106
|
+
pinCursor?: Point$1 | null;
|
|
107
|
+
pinCursorOffset?: Point$1 | null;
|
|
108
108
|
horizontal: {
|
|
109
109
|
x1: number;
|
|
110
110
|
x2: number;
|
|
@@ -139,6 +139,17 @@ type DistanceOverlay = {
|
|
|
139
139
|
type ToolMode = "none" | "select" | "selection" | "guides" | "xray" | "rulers" | "arrows" | "pen" | "text" | "comments";
|
|
140
140
|
type PersistentToolMode = Exclude<ToolMode, "none" | "xray" | "rulers">;
|
|
141
141
|
|
|
142
|
+
type Point = {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
};
|
|
146
|
+
type ToolbarPlacement = Point & {
|
|
147
|
+
edge?: ToolbarSide | null;
|
|
148
|
+
align?: DockAlign;
|
|
149
|
+
vertical?: boolean;
|
|
150
|
+
};
|
|
151
|
+
type DockAlign = "start" | "center" | "end";
|
|
152
|
+
|
|
142
153
|
type TextFont = "handwritten" | "code" | "serif" | "sans-serif";
|
|
143
154
|
type TextStyleSettings = {
|
|
144
155
|
font: TextFont;
|
|
@@ -164,6 +175,8 @@ declare const MESURER_STORAGE_VERSION = 2;
|
|
|
164
175
|
type GuidePattern = "solid" | "dashed" | "dotted";
|
|
165
176
|
type InfoCardMode = "hover" | "click";
|
|
166
177
|
type ThemeMode = "system" | "light" | "dark";
|
|
178
|
+
type ToolbarSide = "top" | "bottom" | "left" | "right";
|
|
179
|
+
type ToolbarDock = "free" | "snap";
|
|
167
180
|
type GuideStyle = {
|
|
168
181
|
opacity: number;
|
|
169
182
|
width: number;
|
|
@@ -183,10 +196,9 @@ type ScreenshotSettings = {
|
|
|
183
196
|
};
|
|
184
197
|
type MesurerStoredSettings = {
|
|
185
198
|
lastToolMode?: PersistentToolMode;
|
|
186
|
-
toolbarPosition?:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
};
|
|
199
|
+
toolbarPosition?: ToolbarPlacement;
|
|
200
|
+
toolbarDock?: ToolbarDock;
|
|
201
|
+
toolbarAutoHide?: boolean;
|
|
190
202
|
highlightColor?: string;
|
|
191
203
|
guideColor?: string;
|
|
192
204
|
arrowColor?: string;
|
|
@@ -384,4 +396,4 @@ type TextInspectorOptions = {
|
|
|
384
396
|
declare const createTextInspector: (options?: TextInspectorOptions, legacy?: boolean) => TextInspectorAPI;
|
|
385
397
|
declare const TextInspector: TextInspectorAPI;
|
|
386
398
|
|
|
387
|
-
export { type Arrow, type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Mesurer, type MesurerFeatures, type MesurerPageArtifacts, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerProps, type MesurerSessionChrome, type MesurerStoredSettings, type MesurerStoredWorkspace, type PagedWorkspaceStore, type PenStroke, type Point, type RulerSettings, type ScreenshotSettings, type ShareMode, type TextAnnotation, type TextFont, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TextStyleSettings, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createPageScopedPersistence, createTextInspector, isPagedWorkspaceStore, normalizeStoredSettings, normalizeStoredWorkspace };
|
|
399
|
+
export { type Arrow, type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Mesurer, type MesurerFeatures, type MesurerPageArtifacts, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerProps, type MesurerSessionChrome, type MesurerStoredSettings, type MesurerStoredWorkspace, type PagedWorkspaceStore, type PenStroke, type Point$1 as Point, type RulerSettings, type ScreenshotSettings, type ShareMode, type TextAnnotation, type TextFont, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TextStyleSettings, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createPageScopedPersistence, createTextInspector, isPagedWorkspaceStore, normalizeStoredSettings, normalizeStoredWorkspace };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,22 +8,22 @@ type ColorSample = {
|
|
|
8
8
|
alpha: number;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
type Point = {
|
|
11
|
+
type Point$1 = {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
14
14
|
};
|
|
15
15
|
type Arrow = {
|
|
16
16
|
id: string;
|
|
17
|
-
start: Point;
|
|
18
|
-
end: Point;
|
|
19
|
-
control?: Point;
|
|
17
|
+
start: Point$1;
|
|
18
|
+
end: Point$1;
|
|
19
|
+
control?: Point$1;
|
|
20
20
|
color: string;
|
|
21
21
|
width: number;
|
|
22
22
|
rotation?: number;
|
|
23
23
|
};
|
|
24
24
|
type PenStroke = {
|
|
25
25
|
id: string;
|
|
26
|
-
points: Point[];
|
|
26
|
+
points: Point$1[];
|
|
27
27
|
color: string;
|
|
28
28
|
width: number;
|
|
29
29
|
rotation?: number;
|
|
@@ -54,8 +54,8 @@ type CommentTarget = {
|
|
|
54
54
|
attributes: Record<string, string>;
|
|
55
55
|
styles: string;
|
|
56
56
|
rect: Rect;
|
|
57
|
-
documentPoint: Point;
|
|
58
|
-
anchor?: Point;
|
|
57
|
+
documentPoint: Point$1;
|
|
58
|
+
anchor?: Point$1;
|
|
59
59
|
};
|
|
60
60
|
type CommentThread = {
|
|
61
61
|
id: string;
|
|
@@ -103,8 +103,8 @@ type DistanceOverlay = {
|
|
|
103
103
|
elementRefB?: Element | null;
|
|
104
104
|
pinTargetRef?: Element | null;
|
|
105
105
|
pinTargetRect?: Rect | null;
|
|
106
|
-
pinCursor?: Point | null;
|
|
107
|
-
pinCursorOffset?: Point | null;
|
|
106
|
+
pinCursor?: Point$1 | null;
|
|
107
|
+
pinCursorOffset?: Point$1 | null;
|
|
108
108
|
horizontal: {
|
|
109
109
|
x1: number;
|
|
110
110
|
x2: number;
|
|
@@ -139,6 +139,17 @@ type DistanceOverlay = {
|
|
|
139
139
|
type ToolMode = "none" | "select" | "selection" | "guides" | "xray" | "rulers" | "arrows" | "pen" | "text" | "comments";
|
|
140
140
|
type PersistentToolMode = Exclude<ToolMode, "none" | "xray" | "rulers">;
|
|
141
141
|
|
|
142
|
+
type Point = {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
};
|
|
146
|
+
type ToolbarPlacement = Point & {
|
|
147
|
+
edge?: ToolbarSide | null;
|
|
148
|
+
align?: DockAlign;
|
|
149
|
+
vertical?: boolean;
|
|
150
|
+
};
|
|
151
|
+
type DockAlign = "start" | "center" | "end";
|
|
152
|
+
|
|
142
153
|
type TextFont = "handwritten" | "code" | "serif" | "sans-serif";
|
|
143
154
|
type TextStyleSettings = {
|
|
144
155
|
font: TextFont;
|
|
@@ -164,6 +175,8 @@ declare const MESURER_STORAGE_VERSION = 2;
|
|
|
164
175
|
type GuidePattern = "solid" | "dashed" | "dotted";
|
|
165
176
|
type InfoCardMode = "hover" | "click";
|
|
166
177
|
type ThemeMode = "system" | "light" | "dark";
|
|
178
|
+
type ToolbarSide = "top" | "bottom" | "left" | "right";
|
|
179
|
+
type ToolbarDock = "free" | "snap";
|
|
167
180
|
type GuideStyle = {
|
|
168
181
|
opacity: number;
|
|
169
182
|
width: number;
|
|
@@ -183,10 +196,9 @@ type ScreenshotSettings = {
|
|
|
183
196
|
};
|
|
184
197
|
type MesurerStoredSettings = {
|
|
185
198
|
lastToolMode?: PersistentToolMode;
|
|
186
|
-
toolbarPosition?:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
};
|
|
199
|
+
toolbarPosition?: ToolbarPlacement;
|
|
200
|
+
toolbarDock?: ToolbarDock;
|
|
201
|
+
toolbarAutoHide?: boolean;
|
|
190
202
|
highlightColor?: string;
|
|
191
203
|
guideColor?: string;
|
|
192
204
|
arrowColor?: string;
|
|
@@ -384,4 +396,4 @@ type TextInspectorOptions = {
|
|
|
384
396
|
declare const createTextInspector: (options?: TextInspectorOptions, legacy?: boolean) => TextInspectorAPI;
|
|
385
397
|
declare const TextInspector: TextInspectorAPI;
|
|
386
398
|
|
|
387
|
-
export { type Arrow, type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Mesurer, type MesurerFeatures, type MesurerPageArtifacts, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerProps, type MesurerSessionChrome, type MesurerStoredSettings, type MesurerStoredWorkspace, type PagedWorkspaceStore, type PenStroke, type Point, type RulerSettings, type ScreenshotSettings, type ShareMode, type TextAnnotation, type TextFont, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TextStyleSettings, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createPageScopedPersistence, createTextInspector, isPagedWorkspaceStore, normalizeStoredSettings, normalizeStoredWorkspace };
|
|
399
|
+
export { type Arrow, type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Mesurer, type MesurerFeatures, type MesurerPageArtifacts, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerProps, type MesurerSessionChrome, type MesurerStoredSettings, type MesurerStoredWorkspace, type PagedWorkspaceStore, type PenStroke, type Point$1 as Point, type RulerSettings, type ScreenshotSettings, type ShareMode, type TextAnnotation, type TextFont, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TextStyleSettings, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createPageScopedPersistence, createTextInspector, isPagedWorkspaceStore, normalizeStoredSettings, normalizeStoredWorkspace };
|