@foldkit/devtools 0.138.0 → 0.139.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/README.md +19 -8
- package/dist/vite.d.ts +4 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +3 -0
- package/package.json +11 -14
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -15
package/README.md
CHANGED
|
@@ -7,33 +7,44 @@ The overlay displays every Message flowing through your app and lets you inspect
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
pnpm add @foldkit/devtools
|
|
10
|
+
pnpm add --save-dev @foldkit/devtools
|
|
11
11
|
# or
|
|
12
|
-
npm install @foldkit/devtools
|
|
12
|
+
npm install --save-dev @foldkit/devtools
|
|
13
13
|
# or
|
|
14
|
-
yarn add @foldkit/devtools
|
|
14
|
+
yarn add --dev @foldkit/devtools
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
`@foldkit/devtools` lists `foldkit`, `@foldkit/ui`, `effect`, and `@effect/platform-browser` as peer dependencies, so install those alongside it.
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
With `@foldkit/vite-plugin`, installing this package as a development dependency is enough to mount the overlay during development. The plugin leaves it out of production builds:
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
24
|
import { Runtime } from 'foldkit'
|
|
25
25
|
|
|
26
|
-
import { overlay } from '@foldkit/devtools'
|
|
27
|
-
|
|
28
26
|
const application = Runtime.makeApplication({
|
|
29
27
|
// ...
|
|
30
|
-
devTools: {
|
|
28
|
+
devTools: {
|
|
29
|
+
Message,
|
|
30
|
+
},
|
|
31
31
|
})
|
|
32
32
|
|
|
33
33
|
Runtime.run(application)
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
The `devTools` configuration is optional unless you need settings such as `Message`, `position`, or `excludeFromHistory`. Recording and the WebSocket bridge that the [DevTools MCP server](https://foldkit.dev/ai/mcp) connects to live in Foldkit's core runtime.
|
|
37
|
+
|
|
38
|
+
To include the overlay in production, move `@foldkit/devtools` to regular `dependencies` and set `show: 'Always'`. The dependency section is the build-time opt-in, and `show` controls whether the runtime mounts it:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
const application = Runtime.makeApplication({
|
|
42
|
+
// ...
|
|
43
|
+
devTools: {
|
|
44
|
+
show: 'Always',
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
```
|
|
37
48
|
|
|
38
49
|
See the [DevTools documentation](https://foldkit.dev/core/devtools) for the full configuration surface.
|
|
39
50
|
|
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,mFAAmF;AACnF,eAAO,MAAM,OAAO,EAAE,eAA+B,CAAA"}
|
package/dist/vite.js
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foldkit/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.139.0",
|
|
4
4
|
"description": "In-browser DevTools overlay for Foldkit applications",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
6
|
"exports": {
|
|
10
|
-
"
|
|
11
|
-
"types": "./dist/
|
|
12
|
-
"import": "./dist/
|
|
7
|
+
"./vite": {
|
|
8
|
+
"types": "./dist/vite.d.ts",
|
|
9
|
+
"import": "./dist/vite.js"
|
|
13
10
|
}
|
|
14
11
|
},
|
|
15
12
|
"sideEffects": false,
|
|
@@ -17,23 +14,23 @@
|
|
|
17
14
|
"dist"
|
|
18
15
|
],
|
|
19
16
|
"peerDependencies": {
|
|
20
|
-
"@effect/platform-browser": "4.0.0-beta.
|
|
17
|
+
"@effect/platform-browser": "4.0.0-beta.103",
|
|
21
18
|
"@foldkit/ui": "^0",
|
|
22
|
-
"effect": "4.0.0-beta.
|
|
19
|
+
"effect": "4.0.0-beta.103",
|
|
23
20
|
"foldkit": "^0"
|
|
24
21
|
},
|
|
25
22
|
"dependencies": {
|
|
26
23
|
"clsx": "^2.1.1"
|
|
27
24
|
},
|
|
28
25
|
"devDependencies": {
|
|
29
|
-
"@effect/platform-browser": "4.0.0-beta.
|
|
30
|
-
"effect": "4.0.0-beta.
|
|
26
|
+
"@effect/platform-browser": "4.0.0-beta.103",
|
|
27
|
+
"effect": "4.0.0-beta.103",
|
|
31
28
|
"rimraf": "^6.1.3",
|
|
32
29
|
"typescript": "^6.0.3",
|
|
33
30
|
"vitest": "^4.1.9",
|
|
34
|
-
"@foldkit/ui": "0.
|
|
35
|
-
"@foldkit/vite-plugin": "0.
|
|
36
|
-
"foldkit": "0.
|
|
31
|
+
"@foldkit/ui": "0.139.0",
|
|
32
|
+
"@foldkit/vite-plugin": "0.12.0",
|
|
33
|
+
"foldkit": "0.139.0"
|
|
37
34
|
},
|
|
38
35
|
"keywords": [
|
|
39
36
|
"foldkit",
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { DevToolsOverlay } from 'foldkit/runtime';
|
|
2
|
-
/**
|
|
3
|
-
* The in-browser DevTools overlay factory. Pass it as `DevToolsConfig.overlay`
|
|
4
|
-
* to mount the panel:
|
|
5
|
-
*
|
|
6
|
-
* ```ts
|
|
7
|
-
* import { overlay } from '@foldkit/devtools'
|
|
8
|
-
*
|
|
9
|
-
* Runtime.makeApplication({
|
|
10
|
-
* // ...
|
|
11
|
-
* devTools: { Message, overlay },
|
|
12
|
-
* })
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare const overlay: DevToolsOverlay;
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAItD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,EAAE,eAA+B,CAAA"}
|
package/dist/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createOverlay } from './overlay.js';
|
|
2
|
-
/**
|
|
3
|
-
* The in-browser DevTools overlay factory. Pass it as `DevToolsConfig.overlay`
|
|
4
|
-
* to mount the panel:
|
|
5
|
-
*
|
|
6
|
-
* ```ts
|
|
7
|
-
* import { overlay } from '@foldkit/devtools'
|
|
8
|
-
*
|
|
9
|
-
* Runtime.makeApplication({
|
|
10
|
-
* // ...
|
|
11
|
-
* devTools: { Message, overlay },
|
|
12
|
-
* })
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export const overlay = createOverlay;
|