mesurer 0.2.0 → 0.2.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/CHANGELOG.md +16 -0
- package/PRIVACY.md +46 -35
- package/README.md +4 -1
- package/dist/index.cjs +4996 -1892
- package/dist/index.d.cts +29 -2
- package/dist/index.d.ts +29 -2
- package/dist/index.js +5045 -1941
- package/dist/styles.css +1 -1
- package/package.json +5 -3
package/dist/index.d.cts
CHANGED
|
@@ -175,9 +175,11 @@ type RulerSettings = {
|
|
|
175
175
|
opacity: number;
|
|
176
176
|
edgeReveal: boolean;
|
|
177
177
|
};
|
|
178
|
+
type ShareMode = "screenshot" | "record";
|
|
178
179
|
type ScreenshotSettings = {
|
|
179
180
|
copy: boolean;
|
|
180
181
|
download: boolean;
|
|
182
|
+
shareMode: ShareMode;
|
|
181
183
|
};
|
|
182
184
|
type MesurerStoredSettings = {
|
|
183
185
|
lastToolMode?: PersistentToolMode;
|
|
@@ -210,6 +212,7 @@ type MesurerStoredSettings = {
|
|
|
210
212
|
};
|
|
211
213
|
type MesurerSessionChrome = {
|
|
212
214
|
enabled: boolean;
|
|
215
|
+
minimized?: boolean;
|
|
213
216
|
xrayVisible: boolean;
|
|
214
217
|
toolMode: ToolMode;
|
|
215
218
|
rulersVisible: boolean;
|
|
@@ -263,6 +266,28 @@ type MesurerFeatures = {
|
|
|
263
266
|
settings?: boolean;
|
|
264
267
|
};
|
|
265
268
|
|
|
269
|
+
type ExtensionRecordingSession = {
|
|
270
|
+
prepare: () => Promise<void>;
|
|
271
|
+
start: (input: {
|
|
272
|
+
rect: {
|
|
273
|
+
left: number;
|
|
274
|
+
top: number;
|
|
275
|
+
width: number;
|
|
276
|
+
height: number;
|
|
277
|
+
};
|
|
278
|
+
viewport: {
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
};
|
|
282
|
+
}) => Promise<void>;
|
|
283
|
+
stop: () => Promise<{
|
|
284
|
+
id: string;
|
|
285
|
+
duration: number;
|
|
286
|
+
}>;
|
|
287
|
+
abort: () => void;
|
|
288
|
+
dispose?: () => void;
|
|
289
|
+
};
|
|
290
|
+
|
|
266
291
|
type MesurerProps = {
|
|
267
292
|
highlightColor?: string;
|
|
268
293
|
guideColor?: string;
|
|
@@ -290,6 +315,8 @@ type MesurerProps = {
|
|
|
290
315
|
persistence?: MesurerPersistence;
|
|
291
316
|
onPersistenceError?: (error: unknown) => void;
|
|
292
317
|
captureVisibleTab?: () => Promise<Blob>;
|
|
318
|
+
extensionRecording?: ExtensionRecordingSession;
|
|
319
|
+
extensionRecordingPlayer?: string;
|
|
293
320
|
features?: MesurerFeatures;
|
|
294
321
|
initialState?: {
|
|
295
322
|
enabled?: boolean;
|
|
@@ -318,7 +345,7 @@ type MesurerProps = {
|
|
|
318
345
|
};
|
|
319
346
|
};
|
|
320
347
|
|
|
321
|
-
declare function Mesurer({ highlightColor, guideColor, arrowColor, guideHighlightEnabled, hoverHighlightEnabled, layoutDetailsEnabled, persistOnReload, persistSession, shortcutsEnabled, theme, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, snapArrowsEnabled, arrowClickToPlace, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, textStyle, persistence, onPersistenceError, captureVisibleTab, features, initialState, }: MesurerProps): react_jsx_runtime.JSX.Element | null;
|
|
348
|
+
declare function Mesurer({ highlightColor, guideColor, arrowColor, guideHighlightEnabled, hoverHighlightEnabled, layoutDetailsEnabled, persistOnReload, persistSession, shortcutsEnabled, theme, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, snapArrowsEnabled, arrowClickToPlace, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, textStyle, persistence, onPersistenceError, captureVisibleTab, extensionRecording, extensionRecordingPlayer, features, initialState, }: MesurerProps): react_jsx_runtime.JSX.Element | null;
|
|
322
349
|
|
|
323
350
|
type TypographyRow = {
|
|
324
351
|
label: string;
|
|
@@ -357,4 +384,4 @@ type TextInspectorOptions = {
|
|
|
357
384
|
declare const createTextInspector: (options?: TextInspectorOptions, legacy?: boolean) => TextInspectorAPI;
|
|
358
385
|
declare const TextInspector: TextInspectorAPI;
|
|
359
386
|
|
|
360
|
-
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 TextAnnotation, type TextFont, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TextStyleSettings, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createPageScopedPersistence, createTextInspector, isPagedWorkspaceStore, normalizeStoredSettings, normalizeStoredWorkspace };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -175,9 +175,11 @@ type RulerSettings = {
|
|
|
175
175
|
opacity: number;
|
|
176
176
|
edgeReveal: boolean;
|
|
177
177
|
};
|
|
178
|
+
type ShareMode = "screenshot" | "record";
|
|
178
179
|
type ScreenshotSettings = {
|
|
179
180
|
copy: boolean;
|
|
180
181
|
download: boolean;
|
|
182
|
+
shareMode: ShareMode;
|
|
181
183
|
};
|
|
182
184
|
type MesurerStoredSettings = {
|
|
183
185
|
lastToolMode?: PersistentToolMode;
|
|
@@ -210,6 +212,7 @@ type MesurerStoredSettings = {
|
|
|
210
212
|
};
|
|
211
213
|
type MesurerSessionChrome = {
|
|
212
214
|
enabled: boolean;
|
|
215
|
+
minimized?: boolean;
|
|
213
216
|
xrayVisible: boolean;
|
|
214
217
|
toolMode: ToolMode;
|
|
215
218
|
rulersVisible: boolean;
|
|
@@ -263,6 +266,28 @@ type MesurerFeatures = {
|
|
|
263
266
|
settings?: boolean;
|
|
264
267
|
};
|
|
265
268
|
|
|
269
|
+
type ExtensionRecordingSession = {
|
|
270
|
+
prepare: () => Promise<void>;
|
|
271
|
+
start: (input: {
|
|
272
|
+
rect: {
|
|
273
|
+
left: number;
|
|
274
|
+
top: number;
|
|
275
|
+
width: number;
|
|
276
|
+
height: number;
|
|
277
|
+
};
|
|
278
|
+
viewport: {
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
};
|
|
282
|
+
}) => Promise<void>;
|
|
283
|
+
stop: () => Promise<{
|
|
284
|
+
id: string;
|
|
285
|
+
duration: number;
|
|
286
|
+
}>;
|
|
287
|
+
abort: () => void;
|
|
288
|
+
dispose?: () => void;
|
|
289
|
+
};
|
|
290
|
+
|
|
266
291
|
type MesurerProps = {
|
|
267
292
|
highlightColor?: string;
|
|
268
293
|
guideColor?: string;
|
|
@@ -290,6 +315,8 @@ type MesurerProps = {
|
|
|
290
315
|
persistence?: MesurerPersistence;
|
|
291
316
|
onPersistenceError?: (error: unknown) => void;
|
|
292
317
|
captureVisibleTab?: () => Promise<Blob>;
|
|
318
|
+
extensionRecording?: ExtensionRecordingSession;
|
|
319
|
+
extensionRecordingPlayer?: string;
|
|
293
320
|
features?: MesurerFeatures;
|
|
294
321
|
initialState?: {
|
|
295
322
|
enabled?: boolean;
|
|
@@ -318,7 +345,7 @@ type MesurerProps = {
|
|
|
318
345
|
};
|
|
319
346
|
};
|
|
320
347
|
|
|
321
|
-
declare function Mesurer({ highlightColor, guideColor, arrowColor, guideHighlightEnabled, hoverHighlightEnabled, layoutDetailsEnabled, persistOnReload, persistSession, shortcutsEnabled, theme, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, snapArrowsEnabled, arrowClickToPlace, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, textStyle, persistence, onPersistenceError, captureVisibleTab, features, initialState, }: MesurerProps): react_jsx_runtime.JSX.Element | null;
|
|
348
|
+
declare function Mesurer({ highlightColor, guideColor, arrowColor, guideHighlightEnabled, hoverHighlightEnabled, layoutDetailsEnabled, persistOnReload, persistSession, shortcutsEnabled, theme, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, snapArrowsEnabled, arrowClickToPlace, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, textStyle, persistence, onPersistenceError, captureVisibleTab, extensionRecording, extensionRecordingPlayer, features, initialState, }: MesurerProps): react_jsx_runtime.JSX.Element | null;
|
|
322
349
|
|
|
323
350
|
type TypographyRow = {
|
|
324
351
|
label: string;
|
|
@@ -357,4 +384,4 @@ type TextInspectorOptions = {
|
|
|
357
384
|
declare const createTextInspector: (options?: TextInspectorOptions, legacy?: boolean) => TextInspectorAPI;
|
|
358
385
|
declare const TextInspector: TextInspectorAPI;
|
|
359
386
|
|
|
360
|
-
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 TextAnnotation, type TextFont, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TextStyleSettings, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createPageScopedPersistence, createTextInspector, isPagedWorkspaceStore, normalizeStoredSettings, normalizeStoredWorkspace };
|
|
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 };
|