fixdog 0.0.3 → 0.0.5
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/InspectorProvider-CZLP6nQJ.cjs.js +1306 -0
- package/dist/InspectorProvider-CZLP6nQJ.cjs.js.map +1 -0
- package/dist/InspectorProvider-DyL7U3Nf.esm.js +1298 -0
- package/dist/InspectorProvider-DyL7U3Nf.esm.js.map +1 -0
- package/dist/InspectorProvider-EwYmLjNr.esm.js +1298 -0
- package/dist/InspectorProvider-EwYmLjNr.esm.js.map +1 -0
- package/dist/InspectorProvider-fvOqLmj2.cjs.js +1306 -0
- package/dist/InspectorProvider-fvOqLmj2.cjs.js.map +1 -0
- package/dist/index.cjs.js +9 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +4 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/react/InspectorProvider.d.ts +2 -2
- package/dist/react/index.cjs.js +5 -26
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.esm.js +3 -28
- package/dist/react/index.esm.js.map +1 -1
- package/package.json +1 -6
package/dist/index.cjs.js
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var react_index = require('./InspectorProvider-CZLP6nQJ.cjs.js');
|
|
4
|
+
require('react/jsx-runtime');
|
|
5
|
+
require('react');
|
|
4
6
|
require('source-map-js');
|
|
5
7
|
|
|
6
8
|
let singleton = null;
|
|
7
9
|
let devModeWarningShown = false;
|
|
8
10
|
const init = (options = {}) => {
|
|
9
11
|
// Strict dev mode check - only work in development
|
|
10
|
-
if (!
|
|
12
|
+
if (!react_index.isDevMode()) {
|
|
11
13
|
if (!devModeWarningShown) {
|
|
12
|
-
console.warn(
|
|
14
|
+
console.warn(react_index.DEV_MODE_WARNING);
|
|
13
15
|
devModeWarningShown = true;
|
|
14
16
|
}
|
|
15
17
|
return null;
|
|
16
18
|
}
|
|
17
19
|
if (singleton)
|
|
18
20
|
return singleton;
|
|
19
|
-
singleton = new
|
|
21
|
+
singleton = new react_index.Inspector({ ...react_index.DEFAULT_OPTIONS, ...options });
|
|
20
22
|
singleton.activate();
|
|
21
23
|
console.info("[fixdog-sdk] initialized - hold Option/Alt and hover to inspect, Option/Alt+click to select");
|
|
22
24
|
return singleton;
|
|
23
25
|
};
|
|
24
26
|
// Enable debug logging for troubleshooting source resolution
|
|
25
27
|
const debug = () => {
|
|
26
|
-
|
|
28
|
+
react_index.enableDebug();
|
|
27
29
|
console.info("[fixdog-sdk] debug mode enabled - check console for detailed logs");
|
|
28
30
|
};
|
|
29
31
|
|
|
30
|
-
exports.Inspector =
|
|
32
|
+
exports.Inspector = react_index.Inspector;
|
|
33
|
+
exports.InspectorProvider = react_index.InspectorProvider;
|
|
31
34
|
exports.debug = debug;
|
|
32
35
|
exports.init = init;
|
|
33
36
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":["isDevMode","DEV_MODE_WARNING","Inspector","DEFAULT_OPTIONS","enableDebug"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":["isDevMode","DEV_MODE_WARNING","Inspector","DEFAULT_OPTIONS","enableDebug"],"mappings":";;;;;;;AAeA,IAAI,SAAS,GAAqB,IAAI;AACtC,IAAI,mBAAmB,GAAG,KAAK;MAElB,IAAI,GAAG,CAAC,OAAO,GAAG,EAAE,KAAI;;AAEnC,IAAA,IAAI,CAACA,qBAAS,EAAE,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE;AACxB,YAAA,OAAO,CAAC,IAAI,CAACC,4BAAgB,CAAC;YAC9B,mBAAmB,GAAG,IAAI;QAC5B;AACA,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI,SAAS;AAAE,QAAA,OAAO,SAAS;AAC/B,IAAA,SAAS,GAAG,IAAIC,qBAAS,CAAC,EAAE,GAAGC,2BAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IAC7D,SAAS,CAAC,QAAQ,EAAE;AACpB,IAAA,OAAO,CAAC,IAAI,CACV,6FAA6F,CAC9F;AACD,IAAA,OAAO,SAAS;AAClB;AAEA;AACO,MAAM,KAAK,GAAG,MAAK;AACxB,IAAAC,uBAAW,EAAE;AACb,IAAA,OAAO,CAAC,IAAI,CACV,mEAAmE,CACpE;AACH;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Inspector } from "./inspector";
|
|
2
2
|
export type { SourceInfo, InspectorOptions, TooltipPosition } from "./types";
|
|
3
3
|
export type { ElementInfo, SidebarState, UiDogSidebarEvent, } from "./types/sidebar";
|
|
4
|
+
export { InspectorProvider } from "./react/InspectorProvider";
|
|
5
|
+
export type { InspectorProviderProps } from "./react/InspectorProvider";
|
|
4
6
|
export declare const init: (options?: {}) => Inspector | null;
|
|
5
7
|
export declare const debug: () => void;
|
|
6
8
|
export { Inspector };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { i as isDevMode, D as DEV_MODE_WARNING, I as Inspector, a as DEFAULT_OPTIONS, e as enableDebug } from './
|
|
1
|
+
import { i as isDevMode, D as DEV_MODE_WARNING, I as Inspector, a as DEFAULT_OPTIONS, e as enableDebug } from './InspectorProvider-DyL7U3Nf.esm.js';
|
|
2
|
+
export { b as InspectorProvider } from './InspectorProvider-DyL7U3Nf.esm.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
2
5
|
import 'source-map-js';
|
|
3
6
|
|
|
4
7
|
let singleton = null;
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAeA,IAAI,SAAS,GAAqB,IAAI;AACtC,IAAI,mBAAmB,GAAG,KAAK;MAElB,IAAI,GAAG,CAAC,OAAO,GAAG,EAAE,KAAI;;AAEnC,IAAA,IAAI,CAAC,SAAS,EAAE,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE;AACxB,YAAA,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAC9B,mBAAmB,GAAG,IAAI;QAC5B;AACA,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI,SAAS;AAAE,QAAA,OAAO,SAAS;AAC/B,IAAA,SAAS,GAAG,IAAI,SAAS,CAAC,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IAC7D,SAAS,CAAC,QAAQ,EAAE;AACpB,IAAA,OAAO,CAAC,IAAI,CACV,6FAA6F,CAC9F;AACD,IAAA,OAAO,SAAS;AAClB;AAEA;AACO,MAAM,KAAK,GAAG,MAAK;AACxB,IAAA,WAAW,EAAE;AACb,IAAA,OAAO,CAAC,IAAI,CACV,mEAAmE,CACpE;AACH;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from "react";
|
|
2
1
|
import { InspectorOptions } from "../types";
|
|
3
2
|
export interface InspectorProviderProps {
|
|
4
3
|
options?: InspectorOptions;
|
|
4
|
+
children?: any;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
6
|
+
export declare function InspectorProvider({ options, children, }: InspectorProviderProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/react/index.cjs.js
CHANGED
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
3
|
+
require('react/jsx-runtime');
|
|
4
|
+
require('react');
|
|
5
|
+
var react_index = require('../InspectorProvider-CZLP6nQJ.cjs.js');
|
|
6
6
|
require('source-map-js');
|
|
7
7
|
|
|
8
|
-
const InspectorProvider = ({ options, children }) => {
|
|
9
|
-
const merged = react.useMemo(() => ({ ...inspector.DEFAULT_OPTIONS, ...options }), [options]);
|
|
10
|
-
const warningShownRef = react.useRef(false);
|
|
11
|
-
react.useEffect(() => {
|
|
12
|
-
// Strict dev mode check - only work in development
|
|
13
|
-
if (!inspector.isDevMode()) {
|
|
14
|
-
if (!warningShownRef.current) {
|
|
15
|
-
console.warn(inspector.DEV_MODE_WARNING);
|
|
16
|
-
warningShownRef.current = true;
|
|
17
|
-
}
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (!merged.enabled)
|
|
21
|
-
return;
|
|
22
|
-
const inspector$1 = new inspector.Inspector(merged);
|
|
23
|
-
inspector$1.activate();
|
|
24
|
-
return () => {
|
|
25
|
-
inspector$1.destroy();
|
|
26
|
-
};
|
|
27
|
-
}, [merged]);
|
|
28
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
29
|
-
};
|
|
30
8
|
|
|
31
|
-
|
|
9
|
+
|
|
10
|
+
exports.InspectorProvider = react_index.InspectorProvider;
|
|
32
11
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/react/index.esm.js
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
export { b as InspectorProvider } from '../InspectorProvider-DyL7U3Nf.esm.js';
|
|
4
4
|
import 'source-map-js';
|
|
5
|
-
|
|
6
|
-
const InspectorProvider = ({ options, children }) => {
|
|
7
|
-
const merged = useMemo(() => ({ ...DEFAULT_OPTIONS, ...options }), [options]);
|
|
8
|
-
const warningShownRef = useRef(false);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
// Strict dev mode check - only work in development
|
|
11
|
-
if (!isDevMode()) {
|
|
12
|
-
if (!warningShownRef.current) {
|
|
13
|
-
console.warn(DEV_MODE_WARNING);
|
|
14
|
-
warningShownRef.current = true;
|
|
15
|
-
}
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
if (!merged.enabled)
|
|
19
|
-
return;
|
|
20
|
-
const inspector = new Inspector(merged);
|
|
21
|
-
inspector.activate();
|
|
22
|
-
return () => {
|
|
23
|
-
inspector.destroy();
|
|
24
|
-
};
|
|
25
|
-
}, [merged]);
|
|
26
|
-
return jsx(Fragment, { children: children });
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { InspectorProvider };
|
|
30
5
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixdog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Option+Click any React component to see its source location",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -11,11 +11,6 @@
|
|
|
11
11
|
"import": "./dist/index.esm.js",
|
|
12
12
|
"require": "./dist/index.cjs.js",
|
|
13
13
|
"types": "./dist/index.d.ts"
|
|
14
|
-
},
|
|
15
|
-
"./react": {
|
|
16
|
-
"import": "./dist/react/index.esm.js",
|
|
17
|
-
"require": "./dist/react/index.cjs.js",
|
|
18
|
-
"types": "./dist/react/index.d.ts"
|
|
19
14
|
}
|
|
20
15
|
},
|
|
21
16
|
"sideEffects": false,
|