@oyerinde/caliper 0.2.0 → 0.2.1
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 +15 -0
- package/README.md +1 -5
- package/dist/bridge.cjs +12 -12
- package/dist/bridge.d.cts +2 -0
- package/dist/bridge.d.ts +2 -0
- package/dist/bridge.js +1 -1
- package/dist/{chunk-ACV6FK43.js → chunk-L47FGEH6.js} +6 -0
- package/dist/{chunk-XYBNY4BT.js → chunk-MTIWXK3P.js} +24 -13
- package/dist/{chunk-OSQHATBH.cjs → chunk-P37B6G5P.cjs} +24 -13
- package/dist/{chunk-3W2YKDGV.cjs → chunk-PYAVLOZM.cjs} +6 -0
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +19 -16
- package/dist/index.d.ts +19 -16
- package/dist/index.global.js +13 -13
- package/dist/index.global.js.map +1 -1
- package/dist/index.global.min.js +4 -4
- package/dist/index.global.min.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +1 -1
- package/dist/mcp.js +1 -1
- package/dist/preset.cjs +6 -6
- package/dist/preset.d.cts +19 -19
- package/dist/preset.d.ts +19 -19
- package/dist/preset.js +3 -3
- package/dist/version.json +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { VERSION, caliperProps, getConfig, createOverlay as init, setConfig } from './chunk-
|
|
1
|
+
export { VERSION, caliperProps, getConfig, createOverlay as init, setConfig } from './chunk-MTIWXK3P.js';
|
package/dist/mcp.cjs
CHANGED
package/dist/mcp.js
CHANGED
package/dist/preset.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkP37B6G5P_cjs = require('./chunk-P37B6G5P.cjs');
|
|
4
|
+
var chunkPYAVLOZM_cjs = require('./chunk-PYAVLOZM.cjs');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @name @oyerinde/caliper
|
|
@@ -16,7 +16,7 @@ var chunk3W2YKDGV_cjs = require('./chunk-3W2YKDGV.cjs');
|
|
|
16
16
|
|
|
17
17
|
// src/preset.ts
|
|
18
18
|
function init(configuration, extensions = []) {
|
|
19
|
-
const caliperInstance =
|
|
19
|
+
const caliperInstance = chunkP37B6G5P_cjs.createOverlay(configuration);
|
|
20
20
|
if (extensions && Array.isArray(extensions)) {
|
|
21
21
|
extensions.forEach((extension) => {
|
|
22
22
|
if (typeof extension === "function") {
|
|
@@ -31,14 +31,14 @@ function init(configuration, extensions = []) {
|
|
|
31
31
|
|
|
32
32
|
Object.defineProperty(exports, "caliperProps", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkP37B6G5P_cjs.caliperProps; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "CaliperAgentStateSchema", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkPYAVLOZM_cjs.CaliperAgentStateSchema; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "CaliperBridge", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkPYAVLOZM_cjs.CaliperBridge; }
|
|
43
43
|
});
|
|
44
44
|
exports.init = init;
|
package/dist/preset.d.cts
CHANGED
|
@@ -7,6 +7,8 @@ export declare interface AgentBridgeConfig {
|
|
|
7
7
|
wsPort?: number;
|
|
8
8
|
/** Callback for agent state changes */
|
|
9
9
|
onStateChange?: (state: CaliperAgentState) => void;
|
|
10
|
+
/** Name of a global window function to call on state changes (IIFE/CDN-safe, JSON-serializable) */
|
|
11
|
+
onStateChangeGlobal?: string;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export declare interface AnimationConfig {
|
|
@@ -488,9 +490,15 @@ export declare const CaliperAgentStateSchema: z.ZodObject<{
|
|
|
488
490
|
*/
|
|
489
491
|
export declare function CaliperBridge(config: AgentBridgeConfig): CaliperPlugin;
|
|
490
492
|
|
|
491
|
-
export declare interface
|
|
492
|
-
|
|
493
|
-
|
|
493
|
+
export declare interface CaliperConfig {
|
|
494
|
+
/** Customize the visual appearance of the overlay (colors, shadows). */
|
|
495
|
+
theme?: ThemeConfig;
|
|
496
|
+
/** Customize keyboard shortcuts for all interactions. */
|
|
497
|
+
commands?: CommandsConfig;
|
|
498
|
+
/** Control the boundary box lerp animation behavior. */
|
|
499
|
+
animation?: AnimationConfig;
|
|
500
|
+
/** Enable debug logging (default: true). All logs are stripped from production builds. */
|
|
501
|
+
debug?: boolean;
|
|
494
502
|
}
|
|
495
503
|
|
|
496
504
|
/**
|
|
@@ -571,7 +579,7 @@ export declare type Extension = ((instance: OverlayInstance) => void) | CaliperP
|
|
|
571
579
|
* @param extensions - An array of functions or plugin objects to install immediately.
|
|
572
580
|
* @returns The initialized Caliper OverlayInstance.
|
|
573
581
|
*/
|
|
574
|
-
export declare function init(configuration?:
|
|
582
|
+
export declare function init(configuration?: CaliperConfig, extensions?: Array<Extension>): OverlayInstance;
|
|
575
583
|
|
|
576
584
|
declare type MeasurementResult = Remap<MeasurementResult_2, {
|
|
577
585
|
primary: DOMRect;
|
|
@@ -746,19 +754,6 @@ declare interface MeasurementSystem {
|
|
|
746
754
|
|
|
747
755
|
declare type MeasurementSystemListener = () => void;
|
|
748
756
|
|
|
749
|
-
export declare interface OverlayConfig {
|
|
750
|
-
/** Customize the visual appearance of the overlay (colors, shadows). */
|
|
751
|
-
theme?: ThemeConfig;
|
|
752
|
-
/** Customize keyboard shortcuts for all interactions. */
|
|
753
|
-
commands?: CommandsConfig;
|
|
754
|
-
/** Control the boundary box lerp animation behavior. */
|
|
755
|
-
animation?: AnimationConfig;
|
|
756
|
-
/** Configure the Agent Bridge for AI/MCP integration. */
|
|
757
|
-
bridge?: AgentBridgeConfig;
|
|
758
|
-
/** Enable debug logging (default: true). All logs are stripped from production builds. */
|
|
759
|
-
debug?: boolean;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
757
|
/**
|
|
763
758
|
* Handle to a running Caliper overlay.
|
|
764
759
|
*/
|
|
@@ -775,12 +770,12 @@ export declare interface OverlayInstance {
|
|
|
775
770
|
/**
|
|
776
771
|
* Synchronously returns the internal systems if they are initialized.
|
|
777
772
|
*/
|
|
778
|
-
getSystems: () =>
|
|
773
|
+
getSystems: () => Systems | null;
|
|
779
774
|
/**
|
|
780
775
|
* Asynchronous helper that resolves when the internal systems are ready.
|
|
781
776
|
* Useful for plugins that need to interact with the DOM or state immediately.
|
|
782
777
|
*/
|
|
783
|
-
waitForSystems: () => Promise<
|
|
778
|
+
waitForSystems: () => Promise<Systems>;
|
|
784
779
|
/**
|
|
785
780
|
* Registers a plugin with this instance.
|
|
786
781
|
*/
|
|
@@ -949,6 +944,11 @@ declare interface SelectionSystem {
|
|
|
949
944
|
updateRect: (rect: DOMRect) => void;
|
|
950
945
|
}
|
|
951
946
|
|
|
947
|
+
export declare interface Systems {
|
|
948
|
+
measurementSystem: MeasurementSystem;
|
|
949
|
+
selectionSystem: SelectionSystem;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
952
|
export declare interface ThemeConfig {
|
|
953
953
|
primary?: string;
|
|
954
954
|
secondary?: string;
|
package/dist/preset.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare interface AgentBridgeConfig {
|
|
|
7
7
|
wsPort?: number;
|
|
8
8
|
/** Callback for agent state changes */
|
|
9
9
|
onStateChange?: (state: CaliperAgentState) => void;
|
|
10
|
+
/** Name of a global window function to call on state changes (IIFE/CDN-safe, JSON-serializable) */
|
|
11
|
+
onStateChangeGlobal?: string;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export declare interface AnimationConfig {
|
|
@@ -488,9 +490,15 @@ export declare const CaliperAgentStateSchema: z.ZodObject<{
|
|
|
488
490
|
*/
|
|
489
491
|
export declare function CaliperBridge(config: AgentBridgeConfig): CaliperPlugin;
|
|
490
492
|
|
|
491
|
-
export declare interface
|
|
492
|
-
|
|
493
|
-
|
|
493
|
+
export declare interface CaliperConfig {
|
|
494
|
+
/** Customize the visual appearance of the overlay (colors, shadows). */
|
|
495
|
+
theme?: ThemeConfig;
|
|
496
|
+
/** Customize keyboard shortcuts for all interactions. */
|
|
497
|
+
commands?: CommandsConfig;
|
|
498
|
+
/** Control the boundary box lerp animation behavior. */
|
|
499
|
+
animation?: AnimationConfig;
|
|
500
|
+
/** Enable debug logging (default: true). All logs are stripped from production builds. */
|
|
501
|
+
debug?: boolean;
|
|
494
502
|
}
|
|
495
503
|
|
|
496
504
|
/**
|
|
@@ -571,7 +579,7 @@ export declare type Extension = ((instance: OverlayInstance) => void) | CaliperP
|
|
|
571
579
|
* @param extensions - An array of functions or plugin objects to install immediately.
|
|
572
580
|
* @returns The initialized Caliper OverlayInstance.
|
|
573
581
|
*/
|
|
574
|
-
export declare function init(configuration?:
|
|
582
|
+
export declare function init(configuration?: CaliperConfig, extensions?: Array<Extension>): OverlayInstance;
|
|
575
583
|
|
|
576
584
|
declare type MeasurementResult = Remap<MeasurementResult_2, {
|
|
577
585
|
primary: DOMRect;
|
|
@@ -746,19 +754,6 @@ declare interface MeasurementSystem {
|
|
|
746
754
|
|
|
747
755
|
declare type MeasurementSystemListener = () => void;
|
|
748
756
|
|
|
749
|
-
export declare interface OverlayConfig {
|
|
750
|
-
/** Customize the visual appearance of the overlay (colors, shadows). */
|
|
751
|
-
theme?: ThemeConfig;
|
|
752
|
-
/** Customize keyboard shortcuts for all interactions. */
|
|
753
|
-
commands?: CommandsConfig;
|
|
754
|
-
/** Control the boundary box lerp animation behavior. */
|
|
755
|
-
animation?: AnimationConfig;
|
|
756
|
-
/** Configure the Agent Bridge for AI/MCP integration. */
|
|
757
|
-
bridge?: AgentBridgeConfig;
|
|
758
|
-
/** Enable debug logging (default: true). All logs are stripped from production builds. */
|
|
759
|
-
debug?: boolean;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
757
|
/**
|
|
763
758
|
* Handle to a running Caliper overlay.
|
|
764
759
|
*/
|
|
@@ -775,12 +770,12 @@ export declare interface OverlayInstance {
|
|
|
775
770
|
/**
|
|
776
771
|
* Synchronously returns the internal systems if they are initialized.
|
|
777
772
|
*/
|
|
778
|
-
getSystems: () =>
|
|
773
|
+
getSystems: () => Systems | null;
|
|
779
774
|
/**
|
|
780
775
|
* Asynchronous helper that resolves when the internal systems are ready.
|
|
781
776
|
* Useful for plugins that need to interact with the DOM or state immediately.
|
|
782
777
|
*/
|
|
783
|
-
waitForSystems: () => Promise<
|
|
778
|
+
waitForSystems: () => Promise<Systems>;
|
|
784
779
|
/**
|
|
785
780
|
* Registers a plugin with this instance.
|
|
786
781
|
*/
|
|
@@ -949,6 +944,11 @@ declare interface SelectionSystem {
|
|
|
949
944
|
updateRect: (rect: DOMRect) => void;
|
|
950
945
|
}
|
|
951
946
|
|
|
947
|
+
export declare interface Systems {
|
|
948
|
+
measurementSystem: MeasurementSystem;
|
|
949
|
+
selectionSystem: SelectionSystem;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
952
|
export declare interface ThemeConfig {
|
|
953
953
|
primary?: string;
|
|
954
954
|
secondary?: string;
|
package/dist/preset.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createOverlay } from './chunk-
|
|
2
|
-
export { caliperProps } from './chunk-
|
|
3
|
-
export { CaliperAgentStateSchema, CaliperBridge } from './chunk-
|
|
1
|
+
import { createOverlay } from './chunk-MTIWXK3P.js';
|
|
2
|
+
export { caliperProps } from './chunk-MTIWXK3P.js';
|
|
3
|
+
export { CaliperAgentStateSchema, CaliperBridge } from './chunk-L47FGEH6.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @name @oyerinde/caliper
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oyerinde/caliper",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "High-precision browser measurements, projections, and layout auditing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"caliper": "./dist/mcp.js"
|
|
11
11
|
},
|
|
12
12
|
"author": "Daniel Oyerinde <oyerinde.daniel@yahoo.com> (https://danieloyerinde.com)",
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://caliper.danieloyerinde.com",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git+https://github.com/oyerindedaniel/caliper.git",
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
"solid-js": "^1.9.10",
|
|
118
118
|
"tsup": "^8.5.1",
|
|
119
119
|
"typescript": "5.9.3",
|
|
120
|
-
"@oyerinde/caliper-schema": "0.1.0",
|
|
121
120
|
"@caliper/core": "0.0.0",
|
|
122
121
|
"@caliper/overlay": "0.0.0",
|
|
123
|
-
"@
|
|
122
|
+
"@oyerinde/caliper-schema": "0.1.0",
|
|
124
123
|
"@oyerinde/caliper-bridge": "0.1.0",
|
|
124
|
+
"@repo/eslint-config": "0.0.0",
|
|
125
125
|
"@repo/typescript-config": "0.0.0",
|
|
126
126
|
"@oyerinde/caliper-mcp": "0.1.0"
|
|
127
127
|
},
|