mesurer-solid 0.1.2 → 0.1.3-beta.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/AGENT_INTEGRATION.md +166 -154
- package/README.md +188 -232
- package/dist/arrange.d.ts +90 -0
- package/dist/arrange.js +2907 -0
- package/dist/core.js +1 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +4392 -2494
- package/dist/inject-script.js +75 -9
- package/dist/inject.js +4937 -3795
- package/dist/screenshot.js +25 -2
- package/package.json +5 -1
- package/skills/mesurer-ui/SKILL.md +209 -139
package/dist/core.js
CHANGED
|
@@ -209,7 +209,7 @@ function i() {
|
|
|
209
209
|
requires: e.requires ?? [],
|
|
210
210
|
provides: e.provides ?? []
|
|
211
211
|
})),
|
|
212
|
-
tools: I.tools().map(({ active: e, disabled: t, hidden: n, icon: r,
|
|
212
|
+
tools: I.tools().map(({ active: e, disabled: t, hidden: n, icon: r, menu: i, ...a }) => a),
|
|
213
213
|
settings: I.settings().map(({ controls: e = [], ...t }) => ({
|
|
214
214
|
...t,
|
|
215
215
|
controls: e.map((e) => ({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { type MesurerAgentHarness } from "./agent";
|
|
2
|
+
import type { ArrangeCapturePlan, ArrangeIntent, ArrangePresentation, ArrangeReview } from "./arrange";
|
|
2
3
|
import type { MesurerAnnotation, MesurerCapturePlanV1, MesurerContextRequest, MesurerContextV1, MesurerReviewV1 } from "./context";
|
|
3
4
|
import type { MesurerPlugin, MesurerPluginDescription, MesurerPluginHost } from "./core";
|
|
4
5
|
import { type MesurerHostLayerMode } from "./host-layer";
|
|
6
|
+
export type MesurerAvailablePlugin = {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
order?: number;
|
|
10
|
+
create(): MesurerPlugin | Promise<MesurerPlugin>;
|
|
11
|
+
settingsIds?: string[];
|
|
12
|
+
hiddenSettingsControlIds?: string[];
|
|
13
|
+
};
|
|
5
14
|
export type ColorPickerFormat = "hex" | "rgb" | "hsl" | "oklch";
|
|
6
15
|
export type MesurerBuiltinPluginId = "select" | "xray" | "color-picker" | "rulers" | "text-inspector" | "guides" | "distance" | "settings";
|
|
7
16
|
export type LinePattern = "solid" | "dashed" | "dotted";
|
|
@@ -132,6 +141,8 @@ export type MesurerOptions = {
|
|
|
132
141
|
selectionSpacingStyle?: Partial<SelectionSpacingStyle>;
|
|
133
142
|
rulerSettings?: Partial<RulerSettings>;
|
|
134
143
|
plugins?: MesurerPlugin[];
|
|
144
|
+
/** Additional plugins that Settings may load on demand even when initially disabled. */
|
|
145
|
+
availablePlugins?: MesurerAvailablePlugin[];
|
|
135
146
|
excludePlugins?: MesurerBuiltinPluginId[];
|
|
136
147
|
pluginHost?: MesurerPluginHost;
|
|
137
148
|
onPluginHost?: (host: MesurerPluginHost) => void;
|
|
@@ -154,6 +165,7 @@ export type MesurerAgentCapabilities = {
|
|
|
154
165
|
annotations: boolean;
|
|
155
166
|
review: boolean;
|
|
156
167
|
capturePlan: boolean;
|
|
168
|
+
arrange: boolean;
|
|
157
169
|
};
|
|
158
170
|
};
|
|
159
171
|
export type MesurerContextHarness = {
|
|
@@ -167,7 +179,14 @@ export type MesurerContextHarness = {
|
|
|
167
179
|
prepareCapture(): Promise<void>;
|
|
168
180
|
finishCapture(): Promise<void>;
|
|
169
181
|
};
|
|
170
|
-
export type
|
|
182
|
+
export type MesurerArrangeHarness = {
|
|
183
|
+
arrangements(): Promise<ArrangeIntent[]>;
|
|
184
|
+
arrange(id: string): Promise<ArrangeIntent>;
|
|
185
|
+
showArrange(id: string, state: ArrangePresentation): Promise<void>;
|
|
186
|
+
arrangeCapturePlan(id: string, state: ArrangePresentation): Promise<ArrangeCapturePlan>;
|
|
187
|
+
reviewArrange(id: string, tolerance?: number): Promise<ArrangeReview>;
|
|
188
|
+
};
|
|
189
|
+
export type MesurerBrowserAgent = MesurerAgentHarness & MesurerContextHarness & MesurerArrangeHarness;
|
|
171
190
|
export type MountedMesurer = {
|
|
172
191
|
element: HTMLDivElement;
|
|
173
192
|
root: HTMLDivElement | ShadowRoot;
|
|
@@ -184,6 +203,11 @@ export type MountedMesurer = {
|
|
|
184
203
|
capturePlan(request?: MesurerContextRequest): Promise<MesurerCapturePlanV1>;
|
|
185
204
|
prepareCapture(): Promise<void>;
|
|
186
205
|
finishCapture(): Promise<void>;
|
|
206
|
+
arrangements(): Promise<ArrangeIntent[]>;
|
|
207
|
+
arrange(id: string): Promise<ArrangeIntent>;
|
|
208
|
+
showArrange(id: string, state: ArrangePresentation): Promise<void>;
|
|
209
|
+
arrangeCapturePlan(id: string, state: ArrangePresentation): Promise<ArrangeCapturePlan>;
|
|
210
|
+
reviewArrange(id: string, tolerance?: number): Promise<ArrangeReview>;
|
|
187
211
|
bringToFront(): void;
|
|
188
212
|
describe(): MesurerPluginDescription | undefined;
|
|
189
213
|
dispose(): void;
|
|
@@ -198,6 +222,7 @@ export declare const mountMeasurer: typeof mountMesurer;
|
|
|
198
222
|
export { createMesurerAgentHarness } from "./agent";
|
|
199
223
|
export { MESURER_VERSION } from "./version";
|
|
200
224
|
export type { AgentDistance, AgentEdges, AgentElementInspection, AgentFeedbackSnapshot, AgentRect, AgentViewportSnapshot, CreateMesurerAgentHarnessOptions, MesurerAgentHarness, } from "./agent";
|
|
225
|
+
export type { ArrangeCapturePlan, ArrangeIntent, ArrangeOffset, ArrangePresentation, ArrangeRect, ArrangeReview, ArrangeReviewTarget, ArrangeTarget, MesurerArrangeService, } from "./arrange";
|
|
201
226
|
export { captureMesurerContext, copyTextToClipboard, createMesurerCapturePlan, formatMesurerContext, reviewMesurerAnnotation, } from "./context";
|
|
202
227
|
export type { MesurerAnnotation, MesurerAnnotationBaseline, MesurerAnnotationTarget, MesurerCapturePlanV1, MesurerContextDistance, MesurerContextEdges, MesurerContextGuide, MesurerContextMeasurement, MesurerContextRect, MesurerContextRequest, MesurerContextTarget, MesurerContextV1, MesurerElementFingerprint, MesurerElementInspection, MesurerReviewChange, MesurerReviewMetricChange, MesurerReviewPresenceChange, MesurerReviewV1, } from "./context";
|
|
203
228
|
export { contextPlugin, MESURER_CONTEXT_PLUGIN_ID, MESURER_CONTEXT_SERVICE_ID, } from "./context-plugin";
|