@pulse-js/tools 0.1.5 → 0.1.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 +5 -1
- package/dist/index.cjs +7 -3
- package/dist/index.js +7 -3
- package/package.json +1 -1
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
|
|
65
|
+
- 🔴 **Red**: Fails
|
|
62
66
|
- 🟡 **Yellow**: Pending (Async operations in flight)
|
|
63
67
|
|
|
64
68
|
## Architecture
|
package/dist/index.cjs
CHANGED
|
@@ -204,7 +204,8 @@ var PulseInspector = class extends HTMLElement {
|
|
|
204
204
|
if (valueEl) {
|
|
205
205
|
const name = valueEl.getAttribute("data-name");
|
|
206
206
|
const unit = this.units.find((u) => u._name === name);
|
|
207
|
-
|
|
207
|
+
const hasName = unit._name && unit._name !== "unnamed";
|
|
208
|
+
if (unit && !("state" in unit) && hasName) {
|
|
208
209
|
this.editingUnit = unit;
|
|
209
210
|
this.editValue = JSON.stringify(unit());
|
|
210
211
|
this.render();
|
|
@@ -345,10 +346,13 @@ var PulseInspector = class extends HTMLElement {
|
|
|
345
346
|
<input class="edit-input" value='${this.safeStringify(value)}' />
|
|
346
347
|
</form>
|
|
347
348
|
` : `
|
|
348
|
-
<div class="value-row ${!isGuard
|
|
349
|
+
<div class="value-row ${!isGuard && name !== "unnamed" ? "editable-value" : ""}"
|
|
350
|
+
data-name="${name}"
|
|
351
|
+
title="${!isGuard ? name === "unnamed" ? "Unnamed sources cannot be edited (not trackable)" : "Click to edit" : ""}">
|
|
349
352
|
<span style="opacity:0.5;margin-right:6px">Value:</span>
|
|
350
353
|
<span class="value-text">${this.formatValue(value)}</span>
|
|
351
|
-
${!isGuard ? `<span class="edit-icon">${ICONS.edit}</span>` : ""}
|
|
354
|
+
${!isGuard && name !== "unnamed" ? `<span class="edit-icon">${ICONS.edit}</span>` : ""}
|
|
355
|
+
${!isGuard && name === "unnamed" ? `<span style="opacity:0.3;font-size:10px;margin-left:auto">\u{1F512} Locked</span>` : ""}
|
|
352
356
|
</div>
|
|
353
357
|
`}
|
|
354
358
|
|
package/dist/index.js
CHANGED
|
@@ -178,7 +178,8 @@ var PulseInspector = class extends HTMLElement {
|
|
|
178
178
|
if (valueEl) {
|
|
179
179
|
const name = valueEl.getAttribute("data-name");
|
|
180
180
|
const unit = this.units.find((u) => u._name === name);
|
|
181
|
-
|
|
181
|
+
const hasName = unit._name && unit._name !== "unnamed";
|
|
182
|
+
if (unit && !("state" in unit) && hasName) {
|
|
182
183
|
this.editingUnit = unit;
|
|
183
184
|
this.editValue = JSON.stringify(unit());
|
|
184
185
|
this.render();
|
|
@@ -319,10 +320,13 @@ var PulseInspector = class extends HTMLElement {
|
|
|
319
320
|
<input class="edit-input" value='${this.safeStringify(value)}' />
|
|
320
321
|
</form>
|
|
321
322
|
` : `
|
|
322
|
-
<div class="value-row ${!isGuard
|
|
323
|
+
<div class="value-row ${!isGuard && name !== "unnamed" ? "editable-value" : ""}"
|
|
324
|
+
data-name="${name}"
|
|
325
|
+
title="${!isGuard ? name === "unnamed" ? "Unnamed sources cannot be edited (not trackable)" : "Click to edit" : ""}">
|
|
323
326
|
<span style="opacity:0.5;margin-right:6px">Value:</span>
|
|
324
327
|
<span class="value-text">${this.formatValue(value)}</span>
|
|
325
|
-
${!isGuard ? `<span class="edit-icon">${ICONS.edit}</span>` : ""}
|
|
328
|
+
${!isGuard && name !== "unnamed" ? `<span class="edit-icon">${ICONS.edit}</span>` : ""}
|
|
329
|
+
${!isGuard && name === "unnamed" ? `<span style="opacity:0.3;font-size:10px;margin-left:auto">\u{1F512} Locked</span>` : ""}
|
|
326
330
|
</div>
|
|
327
331
|
`}
|
|
328
332
|
|