@buoy-gg/image-overlay 7.0.33 → 7.0.35

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.
@@ -337,32 +337,14 @@ function ImageOverlayModal({
337
337
  })]
338
338
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
339
339
  style: styles.toggleSection,
340
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
341
- style: styles.toggleRow,
342
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
343
- style: styles.toggleLabel,
344
- children: "Show Outline"
345
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
346
- value: state.showOutline,
347
- onValueChange: v => _ImageOverlayController.ImageOverlayController.setShowOutline(v),
348
- trackColor: {
349
- false: _sharedUi.night.color.surfaceElevated,
350
- true: _sharedUi.night.color.accent
351
- }
352
- })]
353
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
354
- style: styles.toggleRow,
355
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
356
- style: styles.toggleLabel,
357
- children: "Auto Track"
358
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
359
- value: autoTrack,
360
- onValueChange: setAutoTrack,
361
- trackColor: {
362
- false: _sharedUi.night.color.surfaceElevated,
363
- true: _sharedUi.night.color.accent
364
- }
365
- })]
340
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToggleRow, {
341
+ label: "Show Outline",
342
+ value: state.showOutline,
343
+ onValueChange: v => _ImageOverlayController.ImageOverlayController.setShowOutline(v)
344
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToggleRow, {
345
+ label: "Auto Track",
346
+ value: autoTrack,
347
+ onValueChange: setAutoTrack
366
348
  }), state.imageUri && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
367
349
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
368
350
  style: styles.blendRow,
@@ -519,19 +501,11 @@ function ImageOverlayModal({
519
501
  })
520
502
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
521
503
  style: styles.toggleSection,
522
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
523
- style: styles.toggleRow,
524
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
525
- style: styles.toggleLabel,
526
- children: "Lock Position"
527
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
528
- value: state.locked,
529
- onValueChange: v => _ImageOverlayController.ImageOverlayController.setLocked(v),
530
- trackColor: {
531
- false: _sharedUi.night.color.surfaceElevated,
532
- true: _sharedUi.night.color.warning
533
- }
534
- })]
504
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToggleRow, {
505
+ label: "Lock Position",
506
+ tone: "warning",
507
+ value: state.locked,
508
+ onValueChange: v => _ImageOverlayController.ImageOverlayController.setLocked(v)
535
509
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
536
510
  style: styles.blendRow,
537
511
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
@@ -765,7 +739,7 @@ const styles = _reactNative.StyleSheet.create({
765
739
  fontSize: 12,
766
740
  fontWeight: "600",
767
741
  color: _sharedUi.night.color.text,
768
- fontFamily: "monospace"
742
+ fontFamily: _sharedUi.monoFont
769
743
  },
770
744
  inputSection: {
771
745
  paddingHorizontal: 12,
@@ -407,7 +407,7 @@ const styles = _reactNative.StyleSheet.create({
407
407
  color: "#fff",
408
408
  fontSize: 10,
409
409
  fontWeight: "700",
410
- fontFamily: "monospace"
410
+ fontFamily: _sharedUi.monoFont
411
411
  },
412
412
  freeBorder: {
413
413
  position: "absolute",
@@ -248,6 +248,6 @@ const styles = _reactNative.StyleSheet.create({
248
248
  color: _sharedUi.night.color.text,
249
249
  width: 45,
250
250
  textAlign: "right",
251
- fontFamily: "monospace"
251
+ fontFamily: _sharedUi.monoFont
252
252
  }
253
253
  });
@@ -151,13 +151,13 @@ const styles = _reactNative.StyleSheet.create({
151
151
  testIdValue: {
152
152
  fontSize: 11,
153
153
  color: _sharedUi.night.color.text,
154
- fontFamily: "monospace",
154
+ fontFamily: _sharedUi.monoFont,
155
155
  flex: 1
156
156
  },
157
157
  componentName: {
158
158
  fontSize: 10,
159
159
  color: "#a855f7",
160
- fontFamily: "monospace",
160
+ fontFamily: _sharedUi.monoFont,
161
161
  marginTop: 1
162
162
  },
163
163
  emptyState: {
@@ -176,6 +176,6 @@ const styles = _reactNative.StyleSheet.create({
176
176
  fontSize: 12,
177
177
  textAlign: "center",
178
178
  lineHeight: 18,
179
- fontFamily: "monospace"
179
+ fontFamily: _sharedUi.monoFont
180
180
  }
181
181
  });
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.IMAGE_OVERLAY_ICON_COLOR = void 0;
7
- exports.createImageOverlayTool = createImageOverlayTool;
8
- exports.imageOverlayToolPreset = void 0;
6
+ exports.imageOverlayToolPreset = exports.createImageOverlayTool = exports.IMAGE_OVERLAY_ICON_COLOR = void 0;
9
7
  var _sharedUi = require("@buoy-gg/shared-ui");
10
8
  var _ImageOverlayModal = require("./imageOverlay/components/ImageOverlayModal");
11
9
  var _jsxRuntime = require("react/jsx-runtime");
@@ -23,7 +21,7 @@ var _jsxRuntime = require("react/jsx-runtime");
23
21
  */
24
22
 
25
23
  const IMAGE_OVERLAY_ICON_COLOR = exports.IMAGE_OVERLAY_ICON_COLOR = "#A855F7";
26
- const imageOverlayToolPreset = exports.imageOverlayToolPreset = {
24
+ const imageOverlayToolPreset = exports.imageOverlayToolPreset = (0, _sharedUi.defineToolPreset)({
27
25
  id: "image-overlay",
28
26
  name: "IMG",
29
27
  description: "Design mockup overlay",
@@ -38,22 +36,7 @@ const imageOverlayToolPreset = exports.imageOverlayToolPreset = {
38
36
  props: {
39
37
  enableSharedModalDimensions: false
40
38
  }
41
- };
42
- function createImageOverlayTool(options) {
43
- return {
44
- id: options?.id || "image-overlay",
45
- name: options?.name || "IMG",
46
- description: options?.description || "Design mockup overlay",
47
- slot: "both",
48
- icon: ({
49
- size
50
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ImageOverlayIcon, {
51
- size: size,
52
- color: IMAGE_OVERLAY_ICON_COLOR
53
- }),
54
- component: _ImageOverlayModal.ImageOverlayModal,
55
- props: {
56
- enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
57
- }
58
- };
59
- }
39
+ });
40
+ const createImageOverlayTool = exports.createImageOverlayTool = (0, _sharedUi.createToolFactory)(imageOverlayToolPreset, options => ({
41
+ enableSharedModalDimensions: options.enableSharedModalDimensions ?? false
42
+ }));
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import { useState, useEffect, useCallback } from "react";
4
- import { View, Text, TextInput, TouchableOpacity, StyleSheet, Switch, Alert } from "react-native";
5
- import { JsModal, ModalHeader, macOSColors, night, Trash2, SquareDashed, Image, PowerToggleButton, windowDragProps } from "@buoy-gg/shared-ui";
4
+ import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert } from "react-native";
5
+ import { JsModal, ModalHeader, macOSColors, night, Trash2, SquareDashed, Image, PowerToggleButton, windowDragProps, ToggleRow, monoFont } from "@buoy-gg/shared-ui";
6
6
  import { ImageOverlayController } from "../utils/ImageOverlayController";
7
7
  import { scanForImageTargets } from "../utils/fiberScanner";
8
8
  import { TargetList } from "./TargetList";
@@ -332,32 +332,14 @@ export function ImageOverlayModal({
332
332
  })]
333
333
  }), /*#__PURE__*/_jsxs(View, {
334
334
  style: styles.toggleSection,
335
- children: [/*#__PURE__*/_jsxs(View, {
336
- style: styles.toggleRow,
337
- children: [/*#__PURE__*/_jsx(Text, {
338
- style: styles.toggleLabel,
339
- children: "Show Outline"
340
- }), /*#__PURE__*/_jsx(Switch, {
341
- value: state.showOutline,
342
- onValueChange: v => ImageOverlayController.setShowOutline(v),
343
- trackColor: {
344
- false: night.color.surfaceElevated,
345
- true: night.color.accent
346
- }
347
- })]
348
- }), /*#__PURE__*/_jsxs(View, {
349
- style: styles.toggleRow,
350
- children: [/*#__PURE__*/_jsx(Text, {
351
- style: styles.toggleLabel,
352
- children: "Auto Track"
353
- }), /*#__PURE__*/_jsx(Switch, {
354
- value: autoTrack,
355
- onValueChange: setAutoTrack,
356
- trackColor: {
357
- false: night.color.surfaceElevated,
358
- true: night.color.accent
359
- }
360
- })]
335
+ children: [/*#__PURE__*/_jsx(ToggleRow, {
336
+ label: "Show Outline",
337
+ value: state.showOutline,
338
+ onValueChange: v => ImageOverlayController.setShowOutline(v)
339
+ }), /*#__PURE__*/_jsx(ToggleRow, {
340
+ label: "Auto Track",
341
+ value: autoTrack,
342
+ onValueChange: setAutoTrack
361
343
  }), state.imageUri && /*#__PURE__*/_jsxs(_Fragment, {
362
344
  children: [/*#__PURE__*/_jsxs(View, {
363
345
  style: styles.blendRow,
@@ -514,19 +496,11 @@ export function ImageOverlayModal({
514
496
  })
515
497
  }), /*#__PURE__*/_jsxs(View, {
516
498
  style: styles.toggleSection,
517
- children: [/*#__PURE__*/_jsxs(View, {
518
- style: styles.toggleRow,
519
- children: [/*#__PURE__*/_jsx(Text, {
520
- style: styles.toggleLabel,
521
- children: "Lock Position"
522
- }), /*#__PURE__*/_jsx(Switch, {
523
- value: state.locked,
524
- onValueChange: v => ImageOverlayController.setLocked(v),
525
- trackColor: {
526
- false: night.color.surfaceElevated,
527
- true: night.color.warning
528
- }
529
- })]
499
+ children: [/*#__PURE__*/_jsx(ToggleRow, {
500
+ label: "Lock Position",
501
+ tone: "warning",
502
+ value: state.locked,
503
+ onValueChange: v => ImageOverlayController.setLocked(v)
530
504
  }), /*#__PURE__*/_jsxs(View, {
531
505
  style: styles.blendRow,
532
506
  children: [/*#__PURE__*/_jsx(Text, {
@@ -760,7 +734,7 @@ const styles = StyleSheet.create({
760
734
  fontSize: 12,
761
735
  fontWeight: "600",
762
736
  color: night.color.text,
763
- fontFamily: "monospace"
737
+ fontFamily: monoFont
764
738
  },
765
739
  inputSection: {
766
740
  paddingHorizontal: 12,
@@ -12,7 +12,7 @@
12
12
 
13
13
  import React, { useState, useEffect, useRef, useMemo, useCallback } from "react";
14
14
  import { View, Text, Image as RNImage, StyleSheet, PanResponder, Dimensions } from "react-native";
15
- import { absoluteFill } from "@buoy-gg/shared-ui";
15
+ import { absoluteFill, monoFont } from "@buoy-gg/shared-ui";
16
16
  import { ImageOverlayController } from "../utils/ImageOverlayController";
17
17
 
18
18
  // ─── Overlay Image (handles flip transforms) ─────────────────────────────────
@@ -403,7 +403,7 @@ const styles = StyleSheet.create({
403
403
  color: "#fff",
404
404
  fontSize: 10,
405
405
  fontWeight: "700",
406
- fontFamily: "monospace"
406
+ fontFamily: monoFont
407
407
  },
408
408
  freeBorder: {
409
409
  position: "absolute",
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { useRef, useCallback } from "react";
9
9
  import { View, Text, TouchableOpacity, StyleSheet, PanResponder } from "react-native";
10
- import { night } from "@buoy-gg/shared-ui";
10
+ import { night, monoFont } from "@buoy-gg/shared-ui";
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  function SliderStepper({
13
13
  label,
@@ -244,6 +244,6 @@ const styles = StyleSheet.create({
244
244
  color: night.color.text,
245
245
  width: 45,
246
246
  textAlign: "right",
247
- fontFamily: "monospace"
247
+ fontFamily: monoFont
248
248
  }
249
249
  });
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { View, Text, TouchableOpacity, StyleSheet, ScrollView } from "react-native";
9
- import { ChevronRight, night, Hash, ToolEmptyState } from "@buoy-gg/shared-ui";
9
+ import { ChevronRight, night, Hash, ToolEmptyState, monoFont } from "@buoy-gg/shared-ui";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  function TargetRow({
12
12
  target,
@@ -147,13 +147,13 @@ const styles = StyleSheet.create({
147
147
  testIdValue: {
148
148
  fontSize: 11,
149
149
  color: night.color.text,
150
- fontFamily: "monospace",
150
+ fontFamily: monoFont,
151
151
  flex: 1
152
152
  },
153
153
  componentName: {
154
154
  fontSize: 10,
155
155
  color: "#a855f7",
156
- fontFamily: "monospace",
156
+ fontFamily: monoFont,
157
157
  marginTop: 1
158
158
  },
159
159
  emptyState: {
@@ -172,6 +172,6 @@ const styles = StyleSheet.create({
172
172
  fontSize: 12,
173
173
  textAlign: "center",
174
174
  lineHeight: 18,
175
- fontFamily: "monospace"
175
+ fontFamily: monoFont
176
176
  }
177
177
  });
@@ -13,11 +13,11 @@
13
13
  * ```
14
14
  */
15
15
 
16
- import { ImageOverlayIcon } from "@buoy-gg/shared-ui";
16
+ import { ImageOverlayIcon, createToolFactory, defineToolPreset } from "@buoy-gg/shared-ui";
17
17
  import { ImageOverlayModal } from "./imageOverlay/components/ImageOverlayModal";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  export const IMAGE_OVERLAY_ICON_COLOR = "#A855F7";
20
- export const imageOverlayToolPreset = {
20
+ export const imageOverlayToolPreset = defineToolPreset({
21
21
  id: "image-overlay",
22
22
  name: "IMG",
23
23
  description: "Design mockup overlay",
@@ -32,22 +32,7 @@ export const imageOverlayToolPreset = {
32
32
  props: {
33
33
  enableSharedModalDimensions: false
34
34
  }
35
- };
36
- export function createImageOverlayTool(options) {
37
- return {
38
- id: options?.id || "image-overlay",
39
- name: options?.name || "IMG",
40
- description: options?.description || "Design mockup overlay",
41
- slot: "both",
42
- icon: ({
43
- size
44
- }) => /*#__PURE__*/_jsx(ImageOverlayIcon, {
45
- size: size,
46
- color: IMAGE_OVERLAY_ICON_COLOR
47
- }),
48
- component: ImageOverlayModal,
49
- props: {
50
- enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
51
- }
52
- };
53
- }
35
+ });
36
+ export const createImageOverlayTool = createToolFactory(imageOverlayToolPreset, options => ({
37
+ enableSharedModalDimensions: options.enableSharedModalDimensions ?? false
38
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"ImageOverlayModal.d.ts","sourceRoot":"","sources":["../../../../src/imageOverlay/components/ImageOverlayModal.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,sBAAsB,EAAkC,MAAM,UAAU,CAAC;AAMvF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;AAKjE,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,iBAAiB,EACjB,sBAAsB,EACtB,MAAc,EACd,WAAW,GACZ,EAAE,sBAAsB,+BAgjBxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,GAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAG3E"}
1
+ {"version":3,"file":"ImageOverlayModal.d.ts","sourceRoot":"","sources":["../../../../src/imageOverlay/components/ImageOverlayModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAkC,MAAM,UAAU,CAAC;AAMvF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;AAKjE,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,iBAAiB,EACjB,sBAAsB,EACtB,MAAc,EACd,WAAW,GACZ,EAAE,sBAAsB,+BAoiBxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,GAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAG3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"TargetList.d.ts","sourceRoot":"","sources":["../../../../src/imageOverlay/components/TargetList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAwCjD,UAAU,eAAe;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,+BAwBhE"}
1
+ {"version":3,"file":"TargetList.d.ts","sourceRoot":"","sources":["../../../../src/imageOverlay/components/TargetList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAwCjD,UAAU,eAAe;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,+BAwBhE"}
@@ -25,12 +25,10 @@ export declare const imageOverlayToolPreset: {
25
25
  enableSharedModalDimensions: boolean;
26
26
  };
27
27
  };
28
- export declare function createImageOverlayTool(options?: {
29
- name?: string;
30
- description?: string;
31
- id?: string;
28
+ export declare const createImageOverlayTool: (options?: ({
29
+ /** Enable shared modal dimensions */
32
30
  enableSharedModalDimensions?: boolean;
33
- }): {
31
+ } & import("@buoy-gg/shared-ui").ToolPresetOverrides) | undefined) => {
34
32
  id: string;
35
33
  name: string;
36
34
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAEhF,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD,eAAO,MAAM,sBAAsB;;;;;qBAKhB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAOlC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;;;;;qBAMoB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;EAWpC"}
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAEhF,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD,eAAO,MAAM,sBAAsB;;;;;qBAKhB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAOjC,CAAC;AAEH,eAAO,MAAM,sBAAsB;IAG/B,qCAAqC;kCACP,OAAO;;;;;;qBAbtB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAiBlC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/image-overlay",
3
- "version": "7.0.33",
3
+ "version": "7.0.35",
4
4
  "description": "Pin your Figma mockup on top of the running app — pixel-perfect UI comparison without leaving the simulator. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@buoy-gg/shared-ui": "^7.0.33"
29
+ "@buoy-gg/shared-ui": "^7.0.35"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": "*",