@pulse-js/tools 0.1.5 → 0.1.7

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  The official visual debugging suite for the Pulse ecosystem. Inspect, monitor, and debug your reactive graph in real-time with a premium, developer-focused UI.
4
4
 
5
+ <div align="center">
6
+ <img width="383" height="575" alt="image" src="https://github.com/user-attachments/assets/9b557924-3a2d-4558-843f-f8f2793cc2f1" />
7
+ </div>
8
+
5
9
  ## Features
6
10
 
7
11
  - **Tabbed Interface**: Switch between the standard "Inspector" list and the new "Pulse Tree" dependency graph.
@@ -58,7 +62,7 @@ document.body.appendChild(inspector);
58
62
  - **Naming Matters**: Ensure you provide string names to your Sources and Guards (e.g., `source(val, { name: 'my-source' })`). The DevTools rely on these names to provide meaningful debugging information. Unnamed units will appear but are harder to trace.
59
63
  - **Status Indicators**:
60
64
  - 🟢 **Green**: OK / Active
61
- - 🔴 **Red**: Fails (Hover to see semantic failure reasons)
65
+ - 🔴 **Red**: Fails
62
66
  - 🟡 **Yellow**: Pending (Async operations in flight)
63
67
 
64
68
  ## Architecture
package/dist/index.cjs CHANGED
@@ -202,8 +202,9 @@ var PulseInspector = class extends HTMLElement {
202
202
  }
203
203
  const valueEl = target.closest(".editable-value");
204
204
  if (valueEl) {
205
+ const id = valueEl.getAttribute("data-id");
205
206
  const name = valueEl.getAttribute("data-name");
206
- const unit = this.units.find((u) => u._name === name);
207
+ const unit = this.units.find((u) => u._id === id || u._name === name);
207
208
  if (unit && !("state" in unit)) {
208
209
  this.editingUnit = unit;
209
210
  this.editValue = JSON.stringify(unit());
@@ -324,6 +325,7 @@ var PulseInspector = class extends HTMLElement {
324
325
  renderUnitCard(unit) {
325
326
  const isGuard = "state" in unit;
326
327
  const name = unit._name || "unnamed";
328
+ const id = unit._id;
327
329
  const explanation = isGuard ? unit.explain() : null;
328
330
  const value = isGuard ? explanation.value : unit();
329
331
  let status = "ok";
@@ -345,7 +347,10 @@ var PulseInspector = class extends HTMLElement {
345
347
  <input class="edit-input" value='${this.safeStringify(value)}' />
346
348
  </form>
347
349
  ` : `
348
- <div class="value-row ${!isGuard ? "editable-value" : ""}" data-name="${name}" title="${!isGuard ? "Click to edit" : ""}">
350
+ <div class="value-row ${!isGuard ? "editable-value" : ""}"
351
+ data-id="${id}"
352
+ data-name="${name}"
353
+ title="${!isGuard ? "Click to edit" : ""}">
349
354
  <span style="opacity:0.5;margin-right:6px">Value:</span>
350
355
  <span class="value-text">${this.formatValue(value)}</span>
351
356
  ${!isGuard ? `<span class="edit-icon">${ICONS.edit}</span>` : ""}
package/dist/index.js CHANGED
@@ -176,8 +176,9 @@ var PulseInspector = class extends HTMLElement {
176
176
  }
177
177
  const valueEl = target.closest(".editable-value");
178
178
  if (valueEl) {
179
+ const id = valueEl.getAttribute("data-id");
179
180
  const name = valueEl.getAttribute("data-name");
180
- const unit = this.units.find((u) => u._name === name);
181
+ const unit = this.units.find((u) => u._id === id || u._name === name);
181
182
  if (unit && !("state" in unit)) {
182
183
  this.editingUnit = unit;
183
184
  this.editValue = JSON.stringify(unit());
@@ -298,6 +299,7 @@ var PulseInspector = class extends HTMLElement {
298
299
  renderUnitCard(unit) {
299
300
  const isGuard = "state" in unit;
300
301
  const name = unit._name || "unnamed";
302
+ const id = unit._id;
301
303
  const explanation = isGuard ? unit.explain() : null;
302
304
  const value = isGuard ? explanation.value : unit();
303
305
  let status = "ok";
@@ -319,7 +321,10 @@ var PulseInspector = class extends HTMLElement {
319
321
  <input class="edit-input" value='${this.safeStringify(value)}' />
320
322
  </form>
321
323
  ` : `
322
- <div class="value-row ${!isGuard ? "editable-value" : ""}" data-name="${name}" title="${!isGuard ? "Click to edit" : ""}">
324
+ <div class="value-row ${!isGuard ? "editable-value" : ""}"
325
+ data-id="${id}"
326
+ data-name="${name}"
327
+ title="${!isGuard ? "Click to edit" : ""}">
323
328
  <span style="opacity:0.5;margin-right:6px">Value:</span>
324
329
  <span class="value-text">${this.formatValue(value)}</span>
325
330
  ${!isGuard ? `<span class="edit-icon">${ICONS.edit}</span>` : ""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulse-js/tools",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -13,6 +13,6 @@
13
13
  "lint": "bun x tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@pulse-js/core": "^0.1.8"
16
+ "@pulse-js/core": "^0.1.9"
17
17
  }
18
18
  }