@praxisjs/devtools 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @praxisjs/devtools
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f52354d: Add `@Computed()` decorator to `@praxisjs/decorators` for declaring read-only reactive getters backed by a cached `computed()` signal. The getter recomputes automatically when any `@State` or `@Prop` dependency changes, and the result is cached until a dependency is invalidated — unlike a plain getter which recalculates on every read.
8
+
9
+ `@Debug()` in `@praxisjs/devtools` now supports `@Computed()` getters (`ClassGetterDecoratorContext`) in addition to fields and methods, allowing computed values to be tracked and historized in the devtools panel.
10
+
11
+ Also fixes a bug in the `computed()` primitive where an erroneous `track(recompute)` call caused premature dependency tracking on signal creation.
12
+
13
+ - Updated dependencies [f52354d]
14
+ - @praxisjs/decorators@0.4.0
15
+ - @praxisjs/core@0.4.0
16
+ - @praxisjs/runtime@0.2.1
17
+ - @praxisjs/jsx@0.2.1
18
+
3
19
  ## 0.2.0
4
20
 
5
21
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -21,15 +21,22 @@ export declare const ComponentsPlugin: DevtoolsPlugin;
21
21
  * @Debug()
22
22
  * @State() count = 0;
23
23
  *
24
- * On computed class fields:
25
- * @Debug()
26
- * doubled = computed(() => this.count * 2);
24
+ * On @Computed() getters (stacked):
25
+ * @Debug({ label: "doubled" })
26
+ * @Computed()
27
+ * get doubled() { return this.count * 2; }
27
28
  *
28
29
  * On methods:
29
30
  * @Debug()
30
31
  * increment() { ... }
31
32
  */
32
- export declare function Debug(options?: DebugOptions): (value: unknown, context: ClassMethodDecoratorContext | ClassFieldDecoratorContext) => ((this: object, ...args: unknown[]) => unknown) | undefined;
33
+ export declare function Debug(options?: DebugOptions): DebugDecorator;
34
+
35
+ declare interface DebugDecorator {
36
+ (value: (...args: unknown[]) => unknown, context: ClassMethodDecoratorContext): (...args: unknown[]) => unknown;
37
+ (value: unknown, context: ClassGetterDecoratorContext): void;
38
+ (value: undefined, context: ClassFieldDecoratorContext): void;
39
+ }
33
40
 
34
41
  export declare interface DebugOptions {
35
42
  label?: string;