@praxisjs/devtools 0.2.5 → 0.2.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/CHANGELOG.md +28 -0
- package/assets/uno.generated.css +2 -1
- package/dist/index.d.ts +4 -25
- package/dist/index.js +969 -627
- package/package.json +6 -6
- package/src/__tests__/debug.test.ts +82 -12
- package/src/__tests__/event-bus.test.ts +47 -0
- package/src/__tests__/registry.test.ts +55 -0
- package/src/__tests__/trace.test.ts +51 -0
- package/src/core/event-bus.ts +17 -3
- package/src/decorators/debug.ts +91 -147
- package/src/decorators/trace.ts +39 -36
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @praxisjs/devtools
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 029ef04: Event bus handlers no longer short-circuit on the first error — all handlers run and errors are collected into an `AggregateError`.
|
|
8
|
+
- Updated dependencies [029ef04]
|
|
9
|
+
- Updated dependencies [029ef04]
|
|
10
|
+
- Updated dependencies [029ef04]
|
|
11
|
+
- Updated dependencies [029ef04]
|
|
12
|
+
- Updated dependencies [029ef04]
|
|
13
|
+
- Updated dependencies [029ef04]
|
|
14
|
+
- @praxisjs/core@1.1.0
|
|
15
|
+
- @praxisjs/decorators@0.6.0
|
|
16
|
+
- @praxisjs/runtime@0.2.6
|
|
17
|
+
- @praxisjs/jsx@0.3.5
|
|
18
|
+
|
|
19
|
+
## 0.2.6
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 4d15755: Refactor `@Debug` and `@Trace` internals to use the new decorator factory helpers from `@praxisjs/decorators` (`createFieldDecorator`, `createMethodDecorator`, `createGetterObserverDecorator`, `createClassDecorator`). No changes to public API or behavior.
|
|
24
|
+
- Updated dependencies [3372878]
|
|
25
|
+
- Updated dependencies [feaa478]
|
|
26
|
+
- @praxisjs/core@1.0.0
|
|
27
|
+
- @praxisjs/decorators@0.5.0
|
|
28
|
+
- @praxisjs/runtime@0.2.5
|
|
29
|
+
- @praxisjs/jsx@0.3.4
|
|
30
|
+
|
|
3
31
|
## 0.2.5
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/assets/uno.generated.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentElement } from '@praxisjs/shared';
|
|
2
|
-
|
|
3
|
-
declare type AnyConstructor = new (...args: any[]) => any;
|
|
2
|
+
import { RootComponent } from '@praxisjs/core/internal';
|
|
4
3
|
|
|
5
4
|
export declare interface ComponentEntry {
|
|
6
5
|
id: string;
|
|
@@ -16,24 +15,12 @@ export declare const ComponentsPlugin: DevtoolsPlugin;
|
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Tracks state, computed values, and methods in the devtools panel.
|
|
19
|
-
*
|
|
20
|
-
* On @State() properties (stacked):
|
|
21
|
-
* @Debug()
|
|
22
|
-
* @State() count = 0;
|
|
23
|
-
*
|
|
24
|
-
* On @Computed() getters (stacked):
|
|
25
|
-
* @Debug({ label: "doubled" })
|
|
26
|
-
* @Computed()
|
|
27
|
-
* get doubled() { return this.count * 2; }
|
|
28
|
-
*
|
|
29
|
-
* On methods:
|
|
30
|
-
* @Debug()
|
|
31
|
-
* increment() { ... }
|
|
18
|
+
* Supports @State() fields, @Computed() getters, and methods.
|
|
32
19
|
*/
|
|
33
20
|
export declare function Debug(options?: DebugOptions): DebugDecorator;
|
|
34
21
|
|
|
35
22
|
declare interface DebugDecorator {
|
|
36
|
-
(value: (...args: unknown[]) => unknown, context: ClassMethodDecoratorContext):
|
|
23
|
+
(value: (...args: unknown[]) => unknown, context: ClassMethodDecoratorContext): void;
|
|
37
24
|
(value: unknown, context: ClassGetterDecoratorContext): void;
|
|
38
25
|
(value: undefined, context: ClassFieldDecoratorContext): void;
|
|
39
26
|
}
|
|
@@ -127,14 +114,6 @@ export declare type TimelineEventType = 'signal:change' | 'component:render' | '
|
|
|
127
114
|
|
|
128
115
|
export declare const TimelinePlugin: DevtoolsPlugin;
|
|
129
116
|
|
|
130
|
-
|
|
131
|
-
* Instruments a component class to report renders and lifecycle events
|
|
132
|
-
* to the devtools panel.
|
|
133
|
-
*
|
|
134
|
-
* @Trace()
|
|
135
|
-
* @Component()
|
|
136
|
-
* class MyComponent extends StatefulComponent { ... }
|
|
137
|
-
*/
|
|
138
|
-
export declare function Trace(): <T extends AnyConstructor>(constructor: T, _context: ClassDecoratorContext) => T;
|
|
117
|
+
export declare function Trace(): <T extends new (...args: any[]) => RootComponent<Record<string, any>>>(constructor: T, _context: ClassDecoratorContext) => T;
|
|
139
118
|
|
|
140
119
|
export { }
|