juxscript 1.0.129 → 1.0.130
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.
|
@@ -36,15 +36,14 @@ export declare abstract class BaseSkin<TState extends BaseState, TEngine extends
|
|
|
36
36
|
*
|
|
37
37
|
* Use this for internal signals like "loginSuccess", "error", or "animationStart".
|
|
38
38
|
*/
|
|
39
|
-
protected
|
|
39
|
+
protected onSelf(event: string, callback: (data: any) => void): void;
|
|
40
40
|
/**
|
|
41
41
|
* Utility: Subscribe to the Global Bus (The Neighborhood).
|
|
42
42
|
* "Neighbors" refers to other components or global system events.
|
|
43
43
|
*
|
|
44
|
-
* ⚠️ USE SPARINGLY. Ideally, data flows down from the Engine via State.
|
|
45
44
|
* Use this for purely visual coordination like "theme:switched" or "layout:collapse-all".
|
|
46
45
|
*/
|
|
47
|
-
protected
|
|
46
|
+
protected onNeighbor(channel: string, callback: (data: any) => void): void;
|
|
48
47
|
/**
|
|
49
48
|
* Component Teardown.
|
|
50
49
|
* Removes the root element and cleans up all event listeners.
|
|
@@ -40,7 +40,7 @@ export class BaseSkin {
|
|
|
40
40
|
*
|
|
41
41
|
* Use this for internal signals like "loginSuccess", "error", or "animationStart".
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
onSelf(event, callback) {
|
|
44
44
|
this.engine.on(event, callback);
|
|
45
45
|
this._cleanupTasks.push(() => this.engine.off(event, callback));
|
|
46
46
|
}
|
|
@@ -48,10 +48,9 @@ export class BaseSkin {
|
|
|
48
48
|
* Utility: Subscribe to the Global Bus (The Neighborhood).
|
|
49
49
|
* "Neighbors" refers to other components or global system events.
|
|
50
50
|
*
|
|
51
|
-
* ⚠️ USE SPARINGLY. Ideally, data flows down from the Engine via State.
|
|
52
51
|
* Use this for purely visual coordination like "theme:switched" or "layout:collapse-all".
|
|
53
52
|
*/
|
|
54
|
-
|
|
53
|
+
onNeighbor(channel, callback) {
|
|
55
54
|
Neighborhood.on(channel, callback);
|
|
56
55
|
this._cleanupTasks.push(() => Neighborhood.off(channel, callback));
|
|
57
56
|
}
|