@buoy-gg/debug-borders 2.1.15 → 3.0.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/lib/commonjs/index.js +9 -1
- package/lib/commonjs/sync/debugBordersSyncAdapter.js +34 -0
- package/lib/module/index.js +3 -0
- package/lib/module/sync/debugBordersSyncAdapter.js +30 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/sync/debugBordersSyncAdapter.d.ts +22 -0
- package/lib/typescript/sync/debugBordersSyncAdapter.d.ts.map +1 -0
- package/package.json +5 -5
package/lib/commonjs/index.js
CHANGED
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
debugBordersToolPreset: true,
|
|
8
|
-
createDebugBordersTool: true
|
|
8
|
+
createDebugBordersTool: true,
|
|
9
|
+
debugBordersSyncAdapter: true
|
|
9
10
|
};
|
|
10
11
|
Object.defineProperty(exports, "createDebugBordersTool", {
|
|
11
12
|
enumerable: true,
|
|
@@ -13,6 +14,12 @@ Object.defineProperty(exports, "createDebugBordersTool", {
|
|
|
13
14
|
return _preset.createDebugBordersTool;
|
|
14
15
|
}
|
|
15
16
|
});
|
|
17
|
+
Object.defineProperty(exports, "debugBordersSyncAdapter", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _debugBordersSyncAdapter.debugBordersSyncAdapter;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
16
23
|
Object.defineProperty(exports, "debugBordersToolPreset", {
|
|
17
24
|
enumerable: true,
|
|
18
25
|
get: function () {
|
|
@@ -20,6 +27,7 @@ Object.defineProperty(exports, "debugBordersToolPreset", {
|
|
|
20
27
|
}
|
|
21
28
|
});
|
|
22
29
|
var _preset = require("./preset");
|
|
30
|
+
var _debugBordersSyncAdapter = require("./sync/debugBordersSyncAdapter");
|
|
23
31
|
var _debugBorders = require("./debug-borders");
|
|
24
32
|
Object.keys(_debugBorders).forEach(function (key) {
|
|
25
33
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.debugBordersSyncAdapter = void 0;
|
|
7
|
+
// CJS module (matches how preset.tsx loads it)
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
9
|
+
const DebugBordersManager = require("../debug-borders/utils/DebugBordersManager");
|
|
10
|
+
/**
|
|
11
|
+
* Sync adapter for the debug-borders tool, consumed by @buoy-gg/external-sync's
|
|
12
|
+
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
13
|
+
* this package doesn't need a dependency on it).
|
|
14
|
+
*
|
|
15
|
+
* Debug borders draw on the DEVICE's UI — there is nothing to mirror on a
|
|
16
|
+
* dashboard. This adapter is a remote control: the dashboard reads the
|
|
17
|
+
* current mode from snapshots and drives it via actions.
|
|
18
|
+
*/
|
|
19
|
+
const debugBordersSyncAdapter = exports.debugBordersSyncAdapter = {
|
|
20
|
+
version: 1,
|
|
21
|
+
getSnapshot: () => ({
|
|
22
|
+
mode: DebugBordersManager.getMode()
|
|
23
|
+
}),
|
|
24
|
+
subscribe: onChange => DebugBordersManager.subscribe(onChange),
|
|
25
|
+
actions: {
|
|
26
|
+
/** off → borders → labels → off (labels is Pro-gated on device) */
|
|
27
|
+
cycleMode: () => {
|
|
28
|
+
DebugBordersManager.cycle();
|
|
29
|
+
},
|
|
30
|
+
setMode: params => {
|
|
31
|
+
DebugBordersManager.setMode(params.mode);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
package/lib/module/index.js
CHANGED
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
// Export preset configuration (easiest way to add to FloatingDevTools!)
|
|
4
4
|
export { debugBordersToolPreset, createDebugBordersTool } from "./preset";
|
|
5
5
|
|
|
6
|
+
// External sync (adapter for @buoy-gg/external-sync's useExternalSync)
|
|
7
|
+
export { debugBordersSyncAdapter } from "./sync/debugBordersSyncAdapter";
|
|
8
|
+
|
|
6
9
|
// Export all debug-borders utilities and components
|
|
7
10
|
export * from "./debug-borders";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// CJS module (matches how preset.tsx loads it)
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
5
|
+
const DebugBordersManager = require("../debug-borders/utils/DebugBordersManager");
|
|
6
|
+
/**
|
|
7
|
+
* Sync adapter for the debug-borders tool, consumed by @buoy-gg/external-sync's
|
|
8
|
+
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
9
|
+
* this package doesn't need a dependency on it).
|
|
10
|
+
*
|
|
11
|
+
* Debug borders draw on the DEVICE's UI — there is nothing to mirror on a
|
|
12
|
+
* dashboard. This adapter is a remote control: the dashboard reads the
|
|
13
|
+
* current mode from snapshots and drives it via actions.
|
|
14
|
+
*/
|
|
15
|
+
export const debugBordersSyncAdapter = {
|
|
16
|
+
version: 1,
|
|
17
|
+
getSnapshot: () => ({
|
|
18
|
+
mode: DebugBordersManager.getMode()
|
|
19
|
+
}),
|
|
20
|
+
subscribe: onChange => DebugBordersManager.subscribe(onChange),
|
|
21
|
+
actions: {
|
|
22
|
+
/** off → borders → labels → off (labels is Pro-gated on device) */
|
|
23
|
+
cycleMode: () => {
|
|
24
|
+
DebugBordersManager.cycle();
|
|
25
|
+
},
|
|
26
|
+
setMode: params => {
|
|
27
|
+
DebugBordersManager.setMode(params.mode);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAG1E,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAG1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync adapter for the debug-borders tool, consumed by @buoy-gg/external-sync's
|
|
3
|
+
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
4
|
+
* this package doesn't need a dependency on it).
|
|
5
|
+
*
|
|
6
|
+
* Debug borders draw on the DEVICE's UI — there is nothing to mirror on a
|
|
7
|
+
* dashboard. This adapter is a remote control: the dashboard reads the
|
|
8
|
+
* current mode from snapshots and drives it via actions.
|
|
9
|
+
*/
|
|
10
|
+
export declare const debugBordersSyncAdapter: {
|
|
11
|
+
version: number;
|
|
12
|
+
getSnapshot: () => {
|
|
13
|
+
mode: any;
|
|
14
|
+
};
|
|
15
|
+
subscribe: (onChange: () => void) => () => void;
|
|
16
|
+
actions: {
|
|
17
|
+
/** off → borders → labels → off (labels is Pro-gated on device) */
|
|
18
|
+
cycleMode: () => void;
|
|
19
|
+
setMode: (params: unknown) => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=debugBordersSyncAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debugBordersSyncAdapter.d.ts","sourceRoot":"","sources":["../../../src/sync/debugBordersSyncAdapter.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;0BAGZ,MAAM,IAAI,KACa,MAAM,IAAI;;QAErD,mEAAmE;;0BAIjD,OAAO;;CAI5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/debug-borders",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "debug-borders package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/
|
|
30
|
-
"@buoy-gg/
|
|
29
|
+
"@buoy-gg/core": "3.0.0",
|
|
30
|
+
"@buoy-gg/shared-ui": "3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": "*",
|
|
34
34
|
"react-native": "*",
|
|
35
|
-
"@buoy-gg/license": "
|
|
35
|
+
"@buoy-gg/license": "3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/react": "^19.1.0",
|
|
39
39
|
"@types/react-native": "^0.73.0",
|
|
40
40
|
"typescript": "~5.8.3",
|
|
41
|
-
"@buoy-gg/license": "
|
|
41
|
+
"@buoy-gg/license": "3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"react-native-builder-bob": {
|
|
44
44
|
"source": "src",
|