@tscircuit/core 0.0.200 → 0.0.201
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/dist/index.d.ts +2 -0
- package/dist/index.js +15 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ declare abstract class Renderable implements IRenderable {
|
|
|
42
42
|
protected _markDirty(phase: RenderPhase): void;
|
|
43
43
|
protected _queueAsyncEffect(effect: () => Promise<void>): void;
|
|
44
44
|
_hasIncompleteAsyncEffects(): boolean;
|
|
45
|
+
getCurrentRenderPhase(): RenderPhase | null;
|
|
46
|
+
getRenderGraph(): Record<string, any>;
|
|
45
47
|
runRenderCycle(): void;
|
|
46
48
|
/**
|
|
47
49
|
* This runs all the render methods for a given phase, calling one of:
|
package/dist/index.js
CHANGED
|
@@ -146,6 +146,21 @@ var Renderable = class {
|
|
|
146
146
|
_hasIncompleteAsyncEffects() {
|
|
147
147
|
return this._asyncEffects.some((effect) => !effect.complete);
|
|
148
148
|
}
|
|
149
|
+
getCurrentRenderPhase() {
|
|
150
|
+
return this._currentRenderPhase;
|
|
151
|
+
}
|
|
152
|
+
getRenderGraph() {
|
|
153
|
+
const graph = {
|
|
154
|
+
id: this._renderId,
|
|
155
|
+
currentPhase: this._currentRenderPhase,
|
|
156
|
+
renderPhaseStates: this.renderPhaseStates,
|
|
157
|
+
shouldBeRemoved: this.shouldBeRemoved,
|
|
158
|
+
children: this.children.map(
|
|
159
|
+
(child) => child.getRenderGraph()
|
|
160
|
+
)
|
|
161
|
+
};
|
|
162
|
+
return graph;
|
|
163
|
+
}
|
|
149
164
|
runRenderCycle() {
|
|
150
165
|
for (const renderPhase of orderedRenderPhases) {
|
|
151
166
|
this.runRenderPhaseForChildren(renderPhase);
|