@pulse-js/tools 0.1.1 → 0.1.3
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 +25 -13
- package/dist/index.cjs +319 -293
- package/dist/index.d.cts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +316 -292
- package/package.json +3 -8
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@ The official visual debugging suite for the Pulse ecosystem. Inspect, monitor, a
|
|
|
8
8
|
- **Quadrant-Aware Anchoring**: Intelligent positioning system. The panel automatically expands from the corner closest to its current position (top-left, bottom-right, etc.), ensuring the UI never jumps or floats awkwardly.
|
|
9
9
|
- **Persistent State**: innovative positioning engine remembers exactly where you left the widget, persisting across page reloads and HMR updates.
|
|
10
10
|
- **Real-Time Inspection**: Visualize the status (OK, FAIL, PENDING) and values of all registered Sources and Guards instantly.
|
|
11
|
+
- **Explain API Integration**: Full support for the `guard.explain()` method, showing semantic failure reasons and dependencies.
|
|
11
12
|
- **Glassmorphism Design**: A modern, dark-themed aesthetic that fits seamlessly into developer workflows without obstructing functionality.
|
|
13
|
+
- **Framework-Agnostic**: Built as a standard Web Component, usable in any environment (React, Vue, Svelte, or Vanilla JS).
|
|
12
14
|
|
|
13
15
|
## Installation
|
|
14
16
|
|
|
@@ -18,22 +20,32 @@ npm install @pulse-js/tools
|
|
|
18
20
|
|
|
19
21
|
## Usage
|
|
20
22
|
|
|
21
|
-
### React Integration
|
|
23
|
+
### React Integration (Recommended)
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
The easiest way to use Pulse Tools in React is via the `@pulse-js/react` package, which handles auto-injection.
|
|
24
26
|
|
|
25
27
|
```tsx
|
|
26
|
-
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
// main.tsx
|
|
29
|
+
import "@pulse-js/react/devtools";
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Vanilla / Other Frameworks
|
|
33
|
+
|
|
34
|
+
You can use the `<pulse-inspector>` Web Component directly.
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<script type="module" src="node_modules/@pulse-js/tools/dist/index.js"></script>
|
|
38
|
+
|
|
39
|
+
<pulse-inspector shortcut="Ctrl+D"></pulse-inspector>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or in JavaScript:
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
import "@pulse-js/tools";
|
|
46
|
+
|
|
47
|
+
const inspector = document.createElement("pulse-inspector");
|
|
48
|
+
document.body.appendChild(inspector);
|
|
37
49
|
```
|
|
38
50
|
|
|
39
51
|
### Configuration Props
|