@archie/devtools 0.0.4 → 0.0.6
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/README.md +72 -13
- package/dist/chunk-6MYORGLK.mjs +21 -0
- package/dist/{client.mjs → chunk-EQV632XF.mjs} +25 -14
- package/dist/chunk-NYVHR4QL.mjs +74 -0
- package/dist/client/client.d.mts +2 -0
- package/dist/client/client.d.ts +2 -0
- package/dist/{client.js → client/client.js} +26 -14
- package/dist/client/client.mjs +6 -0
- package/dist/client/inject-inspector/auto.d.mts +2 -0
- package/dist/client/inject-inspector/auto.d.ts +2 -0
- package/dist/client/inject-inspector/auto.js +1197 -0
- package/dist/client/inject-inspector/auto.mjs +7 -0
- package/dist/client/inject-inspector/injectInspector.d.mts +33 -0
- package/dist/client/inject-inspector/injectInspector.d.ts +33 -0
- package/dist/client/inject-inspector/injectInspector.js +1216 -0
- package/dist/client/inject-inspector/injectInspector.mjs +7 -0
- package/dist/client/route-listener/routeListener.js +90 -0
- package/dist/client/route-listener/routeListener.mjs +6 -0
- package/dist/constants/archieOrigins.d.mts +24 -0
- package/dist/constants/archieOrigins.d.ts +24 -0
- package/dist/constants/archieOrigins.js +47 -0
- package/dist/constants/archieOrigins.mjs +10 -0
- package/dist/inspector-LTHUYUGW.mjs +1094 -0
- package/package.json +21 -7
- package/dist/{client.d.mts → client/route-listener/routeListener.d.mts} +19 -19
- package/dist/{client.d.ts → client/route-listener/routeListener.d.ts} +19 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archie/devtools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "DevTools for Archie generated applications - Route synchronization and editor communication",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -12,14 +12,26 @@
|
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"./client": {
|
|
15
|
-
"types": "./dist/client.d.ts",
|
|
16
|
-
"import": "./dist/client.mjs",
|
|
17
|
-
"require": "./dist/client.js"
|
|
15
|
+
"types": "./dist/client/client.d.ts",
|
|
16
|
+
"import": "./dist/client/client.mjs",
|
|
17
|
+
"require": "./dist/client/client.js"
|
|
18
|
+
},
|
|
19
|
+
"./client/inject-inspector/auto": {
|
|
20
|
+
"types": "./dist/client/inject-inspector/auto.d.ts",
|
|
21
|
+
"import": "./dist/client/inject-inspector/auto.mjs",
|
|
22
|
+
"require": "./dist/client/inject-inspector/auto.js"
|
|
23
|
+
},
|
|
24
|
+
"./constants": {
|
|
25
|
+
"types": "./dist/constants/archieOrigins.d.ts",
|
|
26
|
+
"import": "./dist/constants/archieOrigins.mjs",
|
|
27
|
+
"require": "./dist/constants/archieOrigins.js"
|
|
18
28
|
}
|
|
19
29
|
},
|
|
20
30
|
"scripts": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"test:watch": "vitest",
|
|
33
|
+
"build": "tsup src/index.ts src/client/client.ts src/client/inject-inspector/injectInspector.ts src/client/inject-inspector/auto.ts src/client/route-listener/routeListener.ts src/constants/archieOrigins.ts --format cjs,esm --dts",
|
|
34
|
+
"dev": "tsup src/index.ts src/client/client.ts src/client/inject-inspector/injectInspector.ts src/client/inject-inspector/auto.ts src/client/route-listener/routeListener.ts src/constants/archieOrigins.ts --format cjs,esm --dts --watch",
|
|
23
35
|
"typecheck": "tsc --noEmit",
|
|
24
36
|
"release": "node publish.js"
|
|
25
37
|
},
|
|
@@ -39,12 +51,14 @@
|
|
|
39
51
|
"@remix-run/router": "^1.0.0",
|
|
40
52
|
"@types/react": "^19.0.0",
|
|
41
53
|
"@types/react-dom": "^19.0.0",
|
|
54
|
+
"happy-dom": "^20.5.0",
|
|
42
55
|
"react": "^19.0.0",
|
|
43
56
|
"react-dom": "^19.0.0",
|
|
44
57
|
"react-router-dom": "^7.0.0",
|
|
45
58
|
"tsup": "^8.0.0",
|
|
46
59
|
"typescript": "^5.0.0",
|
|
47
|
-
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
60
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
61
|
+
"vitest": "^2.1.9"
|
|
48
62
|
},
|
|
49
63
|
"peerDependencies": {
|
|
50
64
|
"react": ">=18.0.0",
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { Router } from '@remix-run/router';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Archie Route Listener Setup
|
|
5
|
-
*
|
|
6
|
-
* Subscribes to the React Router instance to detect route changes
|
|
7
|
-
* and broadcast them to the host editor (iframe parent or popup opener).
|
|
8
|
-
*
|
|
9
|
-
* @param router - The React Router instance (from createBrowserRouter)
|
|
10
|
-
* @returns Unsubscribe function to stop listening
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { setupArchieRouteListener } from '@archie/devtools/client';
|
|
15
|
-
* import { router } from './App';
|
|
16
|
-
*
|
|
17
|
-
* const unsubscribe = setupArchieRouteListener(router);
|
|
18
|
-
* // Later: unsubscribe();
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare function setupArchieRouteListener(router: Router): () => void;
|
|
22
3
|
/**
|
|
23
4
|
* Route information for the sitemap
|
|
24
5
|
*/
|
|
@@ -45,5 +26,24 @@ interface ArchieRouteUpdateMessage {
|
|
|
45
26
|
timestamp: number;
|
|
46
27
|
};
|
|
47
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Archie Route Listener Setup
|
|
31
|
+
*
|
|
32
|
+
* Subscribes to the React Router instance to detect route changes
|
|
33
|
+
* and broadcast them to the host editor (iframe parent or popup opener).
|
|
34
|
+
*
|
|
35
|
+
* @param router - The React Router instance (from createBrowserRouter)
|
|
36
|
+
* @returns Unsubscribe function to stop listening
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { setupArchieRouteListener } from '@archie/devtools/client';
|
|
41
|
+
* import { router } from './App';
|
|
42
|
+
*
|
|
43
|
+
* const unsubscribe = setupArchieRouteListener(router);
|
|
44
|
+
* // Later: unsubscribe();
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function setupArchieRouteListener(router: Router): () => void;
|
|
48
48
|
|
|
49
49
|
export { type ArchieRouteUpdateMessage, type RouteInfo, setupArchieRouteListener };
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { Router } from '@remix-run/router';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Archie Route Listener Setup
|
|
5
|
-
*
|
|
6
|
-
* Subscribes to the React Router instance to detect route changes
|
|
7
|
-
* and broadcast them to the host editor (iframe parent or popup opener).
|
|
8
|
-
*
|
|
9
|
-
* @param router - The React Router instance (from createBrowserRouter)
|
|
10
|
-
* @returns Unsubscribe function to stop listening
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { setupArchieRouteListener } from '@archie/devtools/client';
|
|
15
|
-
* import { router } from './App';
|
|
16
|
-
*
|
|
17
|
-
* const unsubscribe = setupArchieRouteListener(router);
|
|
18
|
-
* // Later: unsubscribe();
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare function setupArchieRouteListener(router: Router): () => void;
|
|
22
3
|
/**
|
|
23
4
|
* Route information for the sitemap
|
|
24
5
|
*/
|
|
@@ -45,5 +26,24 @@ interface ArchieRouteUpdateMessage {
|
|
|
45
26
|
timestamp: number;
|
|
46
27
|
};
|
|
47
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Archie Route Listener Setup
|
|
31
|
+
*
|
|
32
|
+
* Subscribes to the React Router instance to detect route changes
|
|
33
|
+
* and broadcast them to the host editor (iframe parent or popup opener).
|
|
34
|
+
*
|
|
35
|
+
* @param router - The React Router instance (from createBrowserRouter)
|
|
36
|
+
* @returns Unsubscribe function to stop listening
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { setupArchieRouteListener } from '@archie/devtools/client';
|
|
41
|
+
* import { router } from './App';
|
|
42
|
+
*
|
|
43
|
+
* const unsubscribe = setupArchieRouteListener(router);
|
|
44
|
+
* // Later: unsubscribe();
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function setupArchieRouteListener(router: Router): () => void;
|
|
48
48
|
|
|
49
49
|
export { type ArchieRouteUpdateMessage, type RouteInfo, setupArchieRouteListener };
|