@tscircuit/core 0.0.1127 → 0.0.1128
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 +8 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -327,6 +327,7 @@ declare class IsolatedCircuit {
|
|
|
327
327
|
_hasRenderedAtleastOnce: boolean;
|
|
328
328
|
private _asyncEffectIdsByPhase;
|
|
329
329
|
private _asyncEffectPhaseById;
|
|
330
|
+
private _runningAsyncEffectsById;
|
|
330
331
|
constructor({ platform, projectUrl, cachedSubcircuits, pendingSubcircuitRenders, }?: {
|
|
331
332
|
platform?: PlatformConfig;
|
|
332
333
|
projectUrl?: string;
|
|
@@ -344,6 +345,13 @@ declare class IsolatedCircuit {
|
|
|
344
345
|
renderUntilSettled(): Promise<void>;
|
|
345
346
|
_hasIncompleteAsyncEffects(): boolean;
|
|
346
347
|
_hasIncompleteAsyncEffectsForPhase(phase: RenderPhase): boolean;
|
|
348
|
+
getRunningAsyncEffects(): Array<{
|
|
349
|
+
asyncEffectId: string;
|
|
350
|
+
effectName?: string;
|
|
351
|
+
componentDisplayName?: string;
|
|
352
|
+
phase?: RenderPhase;
|
|
353
|
+
error?: string;
|
|
354
|
+
}>;
|
|
347
355
|
getCircuitJson(): AnyCircuitElement[];
|
|
348
356
|
toJson(): AnyCircuitElement[];
|
|
349
357
|
getSvg(options: {
|
package/dist/index.js
CHANGED
|
@@ -18849,6 +18849,7 @@ var IsolatedCircuit = class {
|
|
|
18849
18849
|
_hasRenderedAtleastOnce = false;
|
|
18850
18850
|
_asyncEffectIdsByPhase = /* @__PURE__ */ new Map();
|
|
18851
18851
|
_asyncEffectPhaseById = /* @__PURE__ */ new Map();
|
|
18852
|
+
_runningAsyncEffectsById = /* @__PURE__ */ new Map();
|
|
18852
18853
|
constructor({
|
|
18853
18854
|
platform,
|
|
18854
18855
|
projectUrl,
|
|
@@ -18958,6 +18959,9 @@ var IsolatedCircuit = class {
|
|
|
18958
18959
|
_hasIncompleteAsyncEffectsForPhase(phase) {
|
|
18959
18960
|
return (this._asyncEffectIdsByPhase.get(phase)?.size ?? 0) > 0;
|
|
18960
18961
|
}
|
|
18962
|
+
getRunningAsyncEffects() {
|
|
18963
|
+
return Array.from(this._runningAsyncEffectsById.values());
|
|
18964
|
+
}
|
|
18961
18965
|
getCircuitJson() {
|
|
18962
18966
|
if (!this._hasRenderedAtleastOnce) this.render();
|
|
18963
18967
|
return this.db.toArray();
|
|
@@ -19057,6 +19061,13 @@ var IsolatedCircuit = class {
|
|
|
19057
19061
|
}
|
|
19058
19062
|
this._asyncEffectIdsByPhase.get(phase).add(asyncEffectId);
|
|
19059
19063
|
this._asyncEffectPhaseById.set(asyncEffectId, phase);
|
|
19064
|
+
this._runningAsyncEffectsById.set(asyncEffectId, {
|
|
19065
|
+
asyncEffectId,
|
|
19066
|
+
effectName: payload.effectName,
|
|
19067
|
+
componentDisplayName: payload.componentDisplayName,
|
|
19068
|
+
phase,
|
|
19069
|
+
error: payload.error
|
|
19070
|
+
});
|
|
19060
19071
|
}
|
|
19061
19072
|
_registerAsyncEffectEnd(payload) {
|
|
19062
19073
|
if (!payload?.asyncEffectId) return;
|
|
@@ -19070,6 +19081,7 @@ var IsolatedCircuit = class {
|
|
|
19070
19081
|
}
|
|
19071
19082
|
}
|
|
19072
19083
|
this._asyncEffectPhaseById.delete(asyncEffectId);
|
|
19084
|
+
this._runningAsyncEffectsById.delete(asyncEffectId);
|
|
19073
19085
|
}
|
|
19074
19086
|
};
|
|
19075
19087
|
|