@tscircuit/core 0.0.1126 → 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 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
@@ -18712,7 +18712,7 @@ var package_default = {
18712
18712
  devDependencies: {
18713
18713
  "@biomejs/biome": "^1.8.3",
18714
18714
  "@resvg/resvg-js": "^2.6.2",
18715
- "@tscircuit/alphabet": "0.0.18",
18715
+ "@tscircuit/alphabet": "0.0.25",
18716
18716
  "@tscircuit/checks": "0.0.115",
18717
18717
  "@tscircuit/capacity-autorouter": "^0.0.359",
18718
18718
  "@tscircuit/circuit-json-util": "^0.0.90",
@@ -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
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1126",
4
+ "version": "0.0.1128",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@biomejs/biome": "^1.8.3",
34
34
  "@resvg/resvg-js": "^2.6.2",
35
- "@tscircuit/alphabet": "0.0.18",
35
+ "@tscircuit/alphabet": "0.0.25",
36
36
  "@tscircuit/checks": "0.0.115",
37
37
  "@tscircuit/capacity-autorouter": "^0.0.359",
38
38
  "@tscircuit/circuit-json-util": "^0.0.90",