mesurer 0.0.11 → 0.1.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.cts CHANGED
@@ -77,9 +77,14 @@ type RulerSettings = {
77
77
  opacity: number;
78
78
  edgeReveal: boolean;
79
79
  };
80
+ type ScreenshotSettings = {
81
+ copy: boolean;
82
+ download: boolean;
83
+ };
80
84
  type MesurerStoredSettings = {
81
85
  highlightColor?: string;
82
86
  guideColor?: string;
87
+ guideHighlightEnabled?: boolean;
83
88
  hoverHighlightEnabled?: boolean;
84
89
  colorPickerFormats?: ColorPickerFormat[];
85
90
  colorPickerClickFormat?: ColorPickerFormat;
@@ -90,6 +95,7 @@ type MesurerStoredSettings = {
90
95
  persistOnReload?: boolean;
91
96
  guideStyle?: Partial<GuideStyle>;
92
97
  rulerSettings?: Partial<RulerSettings>;
98
+ screenshotSettings?: Partial<ScreenshotSettings>;
93
99
  };
94
100
  type MesurerStoredWorkspace = {
95
101
  enabled: boolean;
@@ -124,9 +130,10 @@ declare const normalizeStoredSettings: (value: unknown) => MesurerStoredSettings
124
130
  declare const normalizeStoredWorkspace: (value: unknown) => MesurerStoredWorkspace | null;
125
131
  declare const createLocalStoragePersistence: (ownerWindow: Window, workspaceKey: string, settingsKey?: string, legacyKey?: string) => MesurerPersistence;
126
132
 
127
- type MeasurerProps = {
133
+ type MesurerProps = {
128
134
  highlightColor?: string;
129
135
  guideColor?: string;
136
+ guideHighlightEnabled?: boolean;
130
137
  hoverHighlightEnabled?: boolean;
131
138
  persistOnReload?: boolean;
132
139
  portalTarget?: HTMLElement | ShadowRoot;
@@ -141,8 +148,9 @@ type MeasurerProps = {
141
148
  rulerSettings?: Partial<RulerSettings>;
142
149
  persistence?: MesurerPersistence;
143
150
  onPersistenceError?: (error: unknown) => void;
151
+ captureVisibleTab?: () => Promise<Blob>;
144
152
  };
145
- declare function Measurer({ highlightColor, guideColor, hoverHighlightEnabled, persistOnReload, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, persistence, onPersistenceError, }: MeasurerProps): react_jsx_runtime.JSX.Element | null;
153
+ declare function Mesurer({ highlightColor, guideColor, guideHighlightEnabled, hoverHighlightEnabled, persistOnReload, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, persistence, onPersistenceError, captureVisibleTab, }: MesurerProps): react_jsx_runtime.JSX.Element | null;
146
154
 
147
155
  type TypographyRow = {
148
156
  label: string;
@@ -180,4 +188,4 @@ type TextInspectorOptions = {
180
188
  declare const createTextInspector: (options?: TextInspectorOptions, legacy?: boolean) => TextInspectorAPI;
181
189
  declare const TextInspector: TextInspectorAPI;
182
190
 
183
- export { type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Measurer, type MeasurerProps, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerStoredSettings, type MesurerStoredWorkspace, type RulerSettings, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createTextInspector, normalizeStoredSettings, normalizeStoredWorkspace };
191
+ export { type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Mesurer, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerProps, type MesurerStoredSettings, type MesurerStoredWorkspace, type RulerSettings, type ScreenshotSettings, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createTextInspector, normalizeStoredSettings, normalizeStoredWorkspace };
package/dist/index.d.ts CHANGED
@@ -77,9 +77,14 @@ type RulerSettings = {
77
77
  opacity: number;
78
78
  edgeReveal: boolean;
79
79
  };
80
+ type ScreenshotSettings = {
81
+ copy: boolean;
82
+ download: boolean;
83
+ };
80
84
  type MesurerStoredSettings = {
81
85
  highlightColor?: string;
82
86
  guideColor?: string;
87
+ guideHighlightEnabled?: boolean;
83
88
  hoverHighlightEnabled?: boolean;
84
89
  colorPickerFormats?: ColorPickerFormat[];
85
90
  colorPickerClickFormat?: ColorPickerFormat;
@@ -90,6 +95,7 @@ type MesurerStoredSettings = {
90
95
  persistOnReload?: boolean;
91
96
  guideStyle?: Partial<GuideStyle>;
92
97
  rulerSettings?: Partial<RulerSettings>;
98
+ screenshotSettings?: Partial<ScreenshotSettings>;
93
99
  };
94
100
  type MesurerStoredWorkspace = {
95
101
  enabled: boolean;
@@ -124,9 +130,10 @@ declare const normalizeStoredSettings: (value: unknown) => MesurerStoredSettings
124
130
  declare const normalizeStoredWorkspace: (value: unknown) => MesurerStoredWorkspace | null;
125
131
  declare const createLocalStoragePersistence: (ownerWindow: Window, workspaceKey: string, settingsKey?: string, legacyKey?: string) => MesurerPersistence;
126
132
 
127
- type MeasurerProps = {
133
+ type MesurerProps = {
128
134
  highlightColor?: string;
129
135
  guideColor?: string;
136
+ guideHighlightEnabled?: boolean;
130
137
  hoverHighlightEnabled?: boolean;
131
138
  persistOnReload?: boolean;
132
139
  portalTarget?: HTMLElement | ShadowRoot;
@@ -141,8 +148,9 @@ type MeasurerProps = {
141
148
  rulerSettings?: Partial<RulerSettings>;
142
149
  persistence?: MesurerPersistence;
143
150
  onPersistenceError?: (error: unknown) => void;
151
+ captureVisibleTab?: () => Promise<Blob>;
144
152
  };
145
- declare function Measurer({ highlightColor, guideColor, hoverHighlightEnabled, persistOnReload, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, persistence, onPersistenceError, }: MeasurerProps): react_jsx_runtime.JSX.Element | null;
153
+ declare function Mesurer({ highlightColor, guideColor, guideHighlightEnabled, hoverHighlightEnabled, persistOnReload, portalTarget, persistKey, colorPickerFormats, colorPickerClickFormat, snapEnabled, snapGuidesEnabled, selectNewGuideEnabled, multiMeasureEnabled, guideStyle, rulerSettings, persistence, onPersistenceError, captureVisibleTab, }: MesurerProps): react_jsx_runtime.JSX.Element | null;
146
154
 
147
155
  type TypographyRow = {
148
156
  label: string;
@@ -180,4 +188,4 @@ type TextInspectorOptions = {
180
188
  declare const createTextInspector: (options?: TextInspectorOptions, legacy?: boolean) => TextInspectorAPI;
181
189
  declare const TextInspector: TextInspectorAPI;
182
190
 
183
- export { type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Measurer, type MeasurerProps, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerStoredSettings, type MesurerStoredWorkspace, type RulerSettings, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createTextInspector, normalizeStoredSettings, normalizeStoredWorkspace };
191
+ export { type ColorPickerFormat, type ColorSample, type GuidePattern, type GuideStyle, MESURER_STORAGE_VERSION, Mesurer, type MesurerPersistence, type MesurerPersistenceSnapshot, type MesurerProps, type MesurerStoredSettings, type MesurerStoredWorkspace, type RulerSettings, type ScreenshotSettings, TextInspector, type TextInspectorAPI, type TextInspectorOptions, type TypographyInfo, type TypographyRow, createLocalStoragePersistence, createTextInspector, normalizeStoredSettings, normalizeStoredWorkspace };